From e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 16:21:43 +0300 Subject: Add const to more classes. --- src/properties.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/properties.h') 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()) { -- cgit v1.2.3-60-g2f50