diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-02 20:43:10 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-18 19:58:55 +0100 |
commit | bce577e663e28e1942fda371235eba091a6ea8e2 (patch) | |
tree | a54ce0b47eae92b760ddd763036ff3609d1415ef /src/properties.h | |
parent | 20afba1adc84dd0e859605250c5a44a111045c2b (diff) | |
download | mana-bce577e663e28e1942fda371235eba091a6ea8e2.tar.gz mana-bce577e663e28e1942fda371235eba091a6ea8e2.tar.bz2 mana-bce577e663e28e1942fda371235eba091a6ea8e2.tar.xz mana-bce577e663e28e1942fda371235eba091a6ea8e2.zip |
Removed some 'const' keywords from value returns
It makes no sense to mark a return value as const when it is returned by
value. This only makes sense if the return value is passed by reference, in
order to prevent the receiver from modifying the value.
Also made some other small adjustments. A std::string does not need to be
initialized to "" explicitly and getSafeUtf8String could take its parameter by
reference.
Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/properties.h')
-rw-r--r-- | src/properties.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/properties.h b/src/properties.h index b6ef5d80..59318b80 100644 --- a/src/properties.h +++ b/src/properties.h @@ -42,8 +42,8 @@ class Properties * @return the value of the given property or the given default when it * doesn't exist. */ - const std::string getProperty(const std::string &name, - const std::string &def = "") const + std::string getProperty(const std::string &name, + const std::string &def = "") const { PropertyMap::const_iterator i = mProperties.find(name); return (i != mProperties.end()) ? i->second : def; |