From 4d69cc1c567180b408ddbadb9edf26859cf4c006 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 21 May 2020 22:15:58 +0200 Subject: Core/Misc: GCC build and warning fixes --- src/common/Configuration/Config.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common/Configuration/Config.cpp') diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index c8403a0e666..00869ee9400 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -85,12 +85,12 @@ T ConfigMgr::GetValueDefault(std::string const& name, T def) const { return _config.get(bpt::ptree::path_type(name, '/')); } - catch (bpt::ptree_bad_path) + catch (bpt::ptree_bad_path const&) { TC_LOG_WARN("server.loading", "Missing name %s in config file %s, add \"%s = %s\" to this file", name.c_str(), _filename.c_str(), name.c_str(), std::to_string(def).c_str()); } - catch (bpt::ptree_bad_data) + catch (bpt::ptree_bad_data const&) { TC_LOG_ERROR("server.loading", "Bad value defined for name %s in config file %s, going to use %s instead", name.c_str(), _filename.c_str(), std::to_string(def).c_str()); @@ -106,12 +106,12 @@ std::string ConfigMgr::GetValueDefault(std::string const& name, std { return _config.get(bpt::ptree::path_type(name, '/')); } - catch (bpt::ptree_bad_path) + catch (bpt::ptree_bad_path const&) { TC_LOG_WARN("server.loading", "Missing name %s in config file %s, add \"%s = %s\" to this file", name.c_str(), _filename.c_str(), name.c_str(), def.c_str()); } - catch (bpt::ptree_bad_data) + catch (bpt::ptree_bad_data const&) { TC_LOG_ERROR("server.loading", "Bad value defined for name %s in config file %s, going to use %s instead", name.c_str(), _filename.c_str(), def.c_str()); -- cgit v1.2.3