Merge pull request #52 from ineedbots/develop

Changed C++20 code so it compiles on  C++17
This commit is contained in:
Dss0 2020-12-09 18:18:34 +01:00 committed by GitHub
commit 2fa1a3e29e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,7 +405,7 @@ namespace Components
std::string key = Game::Scr_GetString(0); 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())); Game::Scr_Error(Utils::String::VA("^1StorageRemove: Store does not have key '%s'!\n", key.c_str()));
return; return;
@ -424,7 +424,7 @@ namespace Components
std::string key = Game::Scr_GetString(0); 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())); Game::Scr_Error(Utils::String::VA("^1StorageGet: Store does not have key '%s'!\n", key.c_str()));
return; return;
@ -444,7 +444,7 @@ namespace Components
std::string key = Game::Scr_GetString(0); 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(); Script::AddFunction("StorageClear", [](Game::scr_entref_t) // gsc: StorageClear();