aboutsummaryrefslogtreecommitdiff
path: root/src/common/Configuration/Config.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-02-22 16:25:47 +0100
committerNaios <naios-dev@live.de>2016-02-22 16:25:47 +0100
commitb5369b7d874c337f49051f79dba9508f21a218de (patch)
treea71b3978b6df3769cc654b81f7f70ec1835077a2 /src/common/Configuration/Config.cpp
parentf2233f5d1426d12d16178eced900c1be9666983f (diff)
Core/Common: Add a generic config helper to access built-in overwriteable paths.
* Adds CMAKE_COMMAND and CMAKE_BINARY_DIR to revision_data.h * Move the source and mysql exe path handling out of the DBUpdater. * Make some Config methods const for correctness. * Remove C & CXX flags from revision_data.h (was unused and didn't capture all cxx vars) * Reorder the link order to prevent `ld` from ignoring the file * Ref #15671 (cherry picked from commit 719159e2074ac2d0902c70bdd3c7a39e0d311bbe)
Diffstat (limited to 'src/common/Configuration/Config.cpp')
-rw-r--r--src/common/Configuration/Config.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index 6ac04615315..5db333c8aff 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -61,7 +61,7 @@ bool ConfigMgr::Reload(std::string& error)
return LoadInitial(_filename, error);
}
-std::string ConfigMgr::GetStringDefault(std::string const& name, const std::string& def)
+std::string ConfigMgr::GetStringDefault(std::string const& name, const std::string& def) const
{
std::string value = _config.get<std::string>(ptree::path_type(name, '/'), def);
@@ -70,7 +70,7 @@ std::string ConfigMgr::GetStringDefault(std::string const& name, const std::stri
return value;
}
-bool ConfigMgr::GetBoolDefault(std::string const& name, bool def)
+bool ConfigMgr::GetBoolDefault(std::string const& name, bool def) const
{
try
{
@@ -84,12 +84,12 @@ bool ConfigMgr::GetBoolDefault(std::string const& name, bool def)
}
}
-int ConfigMgr::GetIntDefault(std::string const& name, int def)
+int ConfigMgr::GetIntDefault(std::string const& name, int def) const
{
return _config.get<int>(ptree::path_type(name, '/'), def);
}
-float ConfigMgr::GetFloatDefault(std::string const& name, float def)
+float ConfigMgr::GetFloatDefault(std::string const& name, float def) const
{
return _config.get<float>(ptree::path_type(name, '/'), def);
}