StringConverter::toString [const]
- TWO
- Halfling
- Posts: 61
- Joined: Sat Jan 26, 2008 9:30 pm
- Location: Germany
- Contact:
StringConverter::toString [const]
Is there a reason for StringConverter::toString methods not beeing const?
Team Fortress 2: Meet the Pyro | aka SirPolly
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: StringConverter::toString [const]
The member functions are static and the parameter is const. Why would you want them to return consts?
It's just a utility class.
It's just a utility class.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Halfling
- Posts: 94
- Joined: Mon Sep 08, 2008 3:30 am
Re: StringConverter::toString [const]
Or are you asking something like:
There's no point to this since there's no class member variables for toString to modify, even if it could, it's still static. (And I'm not even sure if it's syntactically valid according to the standard too?)
Code: Select all
static String Ogre::StringConverter::toString( ... ) [b]const[/b] { ... }
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: StringConverter::toString [const]
You can't make a static methods const. It's not valid c++.
- RedEyeCoder
- Gnome
- Posts: 344
- Joined: Sat Jun 16, 2007 7:29 am
- Location: Brisbane, Australia