Core/Misc: GCC build and warning fixes

This commit is contained in:
Shauren
2020-05-21 22:15:58 +02:00
parent 92a289e455
commit 4d69cc1c56
48 changed files with 101 additions and 127 deletions

View File

@@ -85,12 +85,12 @@ T ConfigMgr::GetValueDefault(std::string const& name, T def) const
{
return _config.get<T>(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>(std::string const& name, std
{
return _config.get<std::string>(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());