summaryrefslogtreecommitdiff
path: root/src/properties.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-17 20:23:33 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-04 21:41:25 +0100
commitad276ae0d4679aee9d7e6082fa602b49c6fd940a (patch)
treedf3ff4eb6a315faaf722815c4af1e6398a40e81f /src/properties.h
parent33130dd288f5842f0edde0fff8618cdfe3afc856 (diff)
downloadmana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.gz
mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.bz2
mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.xz
mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.zip
Code reformatting
Mainly making sure 'const std::string &' is used everywhere instead of 'std::string const &'. The former has always been the preferred order in this project. (cherry picked from mainline)
Diffstat (limited to 'src/properties.h')
-rw-r--r--src/properties.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/properties.h b/src/properties.h
index 2eafeeca..a593e8c2 100644
--- a/src/properties.h
+++ b/src/properties.h
@@ -35,8 +35,7 @@ class Properties
/**
* Destructor.
*/
- virtual
- ~Properties() {}
+ virtual ~Properties() {}
/**
* Get a map property.
@@ -46,8 +45,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
+ 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;
@@ -61,7 +60,7 @@ class Properties
* @return the value of the given property, or 0.0f when it doesn't
* exist.
*/
- float getFloatProperty(std::string const &name, float def = 0.0f) const
+ float getFloatProperty(const std::string &name, float def = 0.0f) const
{
PropertyMap::const_iterator i = mProperties.find(name);
float ret = def;
@@ -81,8 +80,7 @@ class Properties
* @return <code>true</code> when a property is defined,
* <code>false</code> otherwise.
*/
- bool
- hasProperty(const std::string &name) const
+ bool hasProperty(const std::string &name) const
{
return (mProperties.find(name) != mProperties.end());
}
@@ -93,8 +91,7 @@ class Properties
* @param name The name of the property.
* @param value The value of the property.
*/
- void
- setProperty(const std::string &name, const std::string &value)
+ void setProperty(const std::string &name, const std::string &value)
{
mProperties[name] = value;
}