diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-08-24 16:38:39 +0200 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2020-08-24 16:38:39 +0200 |
commit | fd05a353418e1be8f4d5194fd2222de7f3955241 (patch) | |
tree | 500a5d8c4f894b1750e9da39f9390593f4610995 /src/common/Configuration/Config.cpp | |
parent | 11c4a60fbe9d471618e0579f588706746ff3e439 (diff) |
Revert "[3.3.5] Core/ChatCommands: C++17 cleanup (if constexpr + std::string_view)"
This reverts commit 11c4a60fbe9d471618e0579f588706746ff3e439.
Diffstat (limited to 'src/common/Configuration/Config.cpp')
-rw-r--r-- | src/common/Configuration/Config.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index d9af7ae1187..fa0e546ccc3 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -137,15 +137,7 @@ bool ConfigMgr::GetBoolDefault(std::string const& name, bool def, bool quiet) co { std::string val = GetValueDefault(name, std::string(def ? "1" : "0"), quiet); val.erase(std::remove(val.begin(), val.end(), '"'), val.end()); - Optional<bool> boolVal = StringToBool(val); - if (boolVal) - return *boolVal; - else - { - 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 ? "true" : "false"); - return def; - } + return StringToBool(val); } int ConfigMgr::GetIntDefault(std::string const& name, int def, bool quiet) const |