mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 11:52:32 +01:00
Revert "[3.3.5] Core/ChatCommands: C++17 cleanup (if constexpr + std::string_view)"
This reverts commit 11c4a60fbe.
This commit is contained in:
@@ -651,13 +651,9 @@ void Trinity::Impl::HexStrToByteArray(std::string_view str, uint8* out, size_t o
|
||||
}
|
||||
}
|
||||
|
||||
Optional<bool> StringToBool(std::string_view str)
|
||||
bool StringToBool(std::string_view str)
|
||||
{
|
||||
if (str == "1" || StringEqualI(str, "y") || StringEqualI(str, "on") || StringEqualI(str, "yes") || StringEqualI(str, "true"))
|
||||
return true;
|
||||
if (str == "0" || StringEqualI(str, "n") || StringEqualI(str, "off") || StringEqualI(str, "no") || StringEqualI(str, "false"))
|
||||
return false;
|
||||
return std::nullopt;
|
||||
return ((str == "1") || StringEqualI(str, "true") || StringEqualI(str, "yes"));
|
||||
}
|
||||
|
||||
bool StringEqualI(std::string_view str1, std::string_view str2)
|
||||
|
||||
Reference in New Issue
Block a user