From 9b5d0a7cdd5c115554c37dd19d9d0c8cfb976ed1 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 16 Oct 2015 08:18:08 -0400 Subject: [PATCH] Config: Removed useless const --- src/Config.cpp | 10 +++++----- src/Config.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index f6617f766..73be2818e 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -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 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]; } //////////////////////////////////////////////////////////////////////////////// -const int Config::getInteger (const std::string& key) +int Config::getInteger (const std::string& key) { if ((*this).find (key) != (*this).end ()) 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. //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 ()) { diff --git a/src/Config.h b/src/Config.h index c024c802b..0cc56f2f8 100644 --- a/src/Config.h +++ b/src/Config.h @@ -49,11 +49,11 @@ public: void setDefaults (); void clear (); - const bool has (const std::string&); - const std::string get (const std::string&); - const int getInteger (const std::string&); - const double getReal (const std::string&); - const bool getBoolean (const std::string&); + bool has (const std::string&); + std::string get (const std::string&); + int getInteger (const std::string&); + double getReal (const std::string&); + bool getBoolean (const std::string&); void set (const std::string&, const int); void set (const std::string&, const double);