[Script] Changed .contains to .count so it doesn't need C++20

This commit is contained in:
INeedBots 2020-12-09 11:06:26 -06:00
parent 8d1b06203e
commit 7d8050a7c6

View File

@ -405,7 +405,7 @@ namespace Components
std::string key = Game::Scr_GetString(0);
if (!Script::ScriptStorage.contains(key))
if (!Script::ScriptStorage.count(key))
{
Game::Scr_Error(Utils::String::VA("^1StorageRemove: Store does not have key '%s'!\n", key.c_str()));
return;
@ -424,7 +424,7 @@ namespace Components
std::string key = Game::Scr_GetString(0);
if (!Script::ScriptStorage.contains(key))
if (!Script::ScriptStorage.count(key))
{
Game::Scr_Error(Utils::String::VA("^1StorageGet: Store does not have key '%s'!\n", key.c_str()));
return;
@ -444,7 +444,7 @@ namespace Components
std::string key = Game::Scr_GetString(0);
Game::Scr_AddInt(Script::ScriptStorage.contains(key));
Game::Scr_AddInt(Script::ScriptStorage.count(key));
});
Script::AddFunction("StorageClear", [](Game::scr_entref_t) // gsc: StorageClear();