diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 16:21:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 16:35:24 +0300 |
commit | e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6 (patch) | |
tree | 9765a6516e4a6e284ed7b589090db7f1f4cd80ea /src/properties.h | |
parent | 962f182fcc989ec587282e44f889188ce241ba31 (diff) | |
download | manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.gz manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.bz2 manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.xz manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.zip |
Add const to more classes.
Diffstat (limited to 'src/properties.h')
-rw-r--r-- | src/properties.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/properties.h b/src/properties.h index 501a20a57..63dcd9afc 100644 --- a/src/properties.h +++ b/src/properties.h @@ -50,7 +50,7 @@ class Properties const std::string getProperty(const std::string &name, const std::string &def = "") const { - PropertyMap::const_iterator i = mProperties.find(name); + const PropertyMap::const_iterator i = mProperties.find(name); return (i != mProperties.end()) ? i->second : def; } @@ -62,9 +62,10 @@ class Properties * @return the value of the given property or the given default when it * doesn't exist. */ - float getFloatProperty(const std::string &name, float def = 0.0f) const + float getFloatProperty(const std::string &name, + const float def = 0.0f) const { - PropertyMap::const_iterator i = mProperties.find(name); + const PropertyMap::const_iterator i = mProperties.find(name); float ret = def; if (i != mProperties.end()) { @@ -83,9 +84,10 @@ class Properties * @return the value of the given property or the given default when it * doesn't exist. */ - bool getBoolProperty(const std::string &name, bool def = false) const + bool getBoolProperty(const std::string &name, + const bool def = false) const { - PropertyMap::const_iterator i = mProperties.find(name); + const PropertyMap::const_iterator i = mProperties.find(name); bool ret = def; if (i != mProperties.end()) { |