From 2a6ba3cd94649d514dc2ef4b2e10f780cb3e6ebe Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Wed, 15 May 2024 17:02:00 -0500 Subject: [PATCH] Fix trailing whitespaces in game.cpp --- src/game.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 2f381467024..4138bbbbd0b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1233,7 +1233,7 @@ static void deserializeSaveGameV16Data_json(const nlohmann::json &o, SAVE_GAME_V { deserializeSaveGameV15Data_json(o, (SAVE_GAME_V15 *) serializeGame); for (unsigned i = 0; i < MAX_NOGO_AREAS; ++i) - { + { deserializeLandingZoneData_json(o.at("landingZones").at(i), &serializeGame->sLandingZone[i]); } } @@ -1545,7 +1545,7 @@ static void deserializeSaveGameV22Data_json(const nlohmann::json &o, SAVE_GAME_V const nlohmann::json runData = o.at("runData"); ASSERT_OR_RETURN(, runData.is_array(), "unexpected type, wanted array"); deserializeRunData_json(runData.at(i), &serializeGame->asRunData[i]); - + } } @@ -1981,7 +1981,7 @@ static bool serializeSaveGameV38Data(PHYSFS_file *fileHandle, const SAVE_GAME_V3 { return false; } - + if (WZ_PHYSFS_writeBytes(fileHandle, serializeGame->modList, modlist_string_size) != modlist_string_size) { return false; @@ -2018,7 +2018,7 @@ static void serializeSaveGameData_json(nlohmann::json &o, nlohmann::json &savein serializeSaveGameV38Data_json(o, (const SAVE_GAME_V38 *) serializeGame); // not sure whether its 38, 39 or 40... different .cpp files are using different numbers o["version"] = VERSION_39; - + // This file lists saved games, and their build info // one per savegame directory const auto tagResult = version_extractVersionNumberFromTag(version_getLatestTag()); @@ -2030,7 +2030,7 @@ static void serializeSaveGameData_json(nlohmann::json &o, nlohmann::json &savein if (saveinfo.contains(saveName)) { saveinfo.erase(saveName); - } + } char ourtime[20]; const time_t curtime = time(nullptr); struct tm timeinfo = getLocalTime(curtime); @@ -2053,7 +2053,7 @@ static bool deserializeSaveGameData_json(const nlohmann::json &o, SAVE_GAME *ser debug(LOG_ERROR, "%s", e.what()); return false; } - + } static bool deserializeSaveGameData(PHYSFS_file *fileHandle, SAVE_GAME *serializeGame) { @@ -4194,7 +4194,7 @@ bool gameLoadV(PHYSFS_file *fileHandle, unsigned int version, nonstd::optional 0) { @@ -6239,7 +6239,7 @@ static bool loadSaveStructure2(const char *pFileName) for (int moduleIdx = 0; moduleIdx < capacity; moduleIdx++) { buildStructure(psModule, psStructure->pos.x, psStructure->pos.y, psStructure->player, true); - + } } if (ini.contains("Factory/template")) @@ -7190,9 +7190,9 @@ static bool writeTerrainTypeMapFile(char *pFileName) bool isComponentStateValid(int state) { - return state == UNAVAILABLE - || state == AVAILABLE - || state == FOUND + return state == UNAVAILABLE + || state == AVAILABLE + || state == FOUND || state == REDUNDANT || state == REDUNDANT_FOUND || state == REDUNDANT_UNAVAILABLE;