Config: Removed useless const

This commit is contained in:
Paul Beckingham 2015-10-16 08:18:08 -04:00
parent 638c2b35c3
commit 9b5d0a7cdd
2 changed files with 10 additions and 10 deletions

View file

@ -634,20 +634,20 @@ void Config::clear ()
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const bool Config::has (const std::string& key) bool Config::has (const std::string& key)
{ {
return (*this).find (key) != (*this).end (); return (*this).find (key) != (*this).end ();
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Return the configuration value given the specified key. // Return the configuration value given the specified key.
const std::string Config::get (const std::string& key) std::string Config::get (const std::string& key)
{ {
return (*this)[key]; return (*this)[key];
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const int Config::getInteger (const std::string& key) int Config::getInteger (const std::string& key)
{ {
if ((*this).find (key) != (*this).end ()) if ((*this).find (key) != (*this).end ())
return strtoimax ((*this)[key].c_str (), NULL, 10); return strtoimax ((*this)[key].c_str (), NULL, 10);
@ -656,7 +656,7 @@ const int Config::getInteger (const std::string& key)
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const double Config::getReal (const std::string& key) double Config::getReal (const std::string& key)
{ {
//NOTE: Backwards compatible handling of next coefficient. //NOTE: Backwards compatible handling of next coefficient.
//TODO: Remove. //TODO: Remove.
@ -670,7 +670,7 @@ const double Config::getReal (const std::string& key)
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const bool Config::getBoolean (const std::string& key) bool Config::getBoolean (const std::string& key)
{ {
if ((*this).find (key) != (*this).end ()) if ((*this).find (key) != (*this).end ())
{ {

View file

@ -49,11 +49,11 @@ public:
void setDefaults (); void setDefaults ();
void clear (); void clear ();
const bool has (const std::string&); bool has (const std::string&);
const std::string get (const std::string&); std::string get (const std::string&);
const int getInteger (const std::string&); int getInteger (const std::string&);
const double getReal (const std::string&); double getReal (const std::string&);
const bool getBoolean (const std::string&); bool getBoolean (const std::string&);
void set (const std::string&, const int); void set (const std::string&, const int);
void set (const std::string&, const double); void set (const std::string&, const double);