diff --git a/src/openrct2-ui/interface/FileBrowser.cpp b/src/openrct2-ui/interface/FileBrowser.cpp index 92f4b3b15c..6a020d118c 100644 --- a/src/openrct2-ui/interface/FileBrowser.cpp +++ b/src/openrct2-ui/interface/FileBrowser.cpp @@ -202,7 +202,7 @@ namespace OpenRCT2::Ui::FileBrowser u8string RemovePatternWildcard(u8string_view pattern) { - while (pattern.length() >= 1 && pattern.front() == '*') + while (!pattern.empty() && pattern.front() == '*') { pattern.remove_prefix(1); } diff --git a/src/openrct2-ui/scripting/CustomListView.cpp b/src/openrct2-ui/scripting/CustomListView.cpp index a44313635e..99a245d5cd 100644 --- a/src/openrct2-ui/scripting/CustomListView.cpp +++ b/src/openrct2-ui/scripting/CustomListView.cpp @@ -615,9 +615,9 @@ void CustomListView::Paint(WindowBase* w, RenderTarget& rt, const ScrollArea* sc } // Columns - if (Columns.size() == 0) + if (Columns.empty()) { - if (item.Cells.size() != 0) + if (!item.Cells.empty()) { const auto& text = item.Cells[0]; if (!text.empty()) @@ -804,7 +804,7 @@ std::optional CustomListView::GetItemIndexAt(const ScreenCoordsXY& po } // Check what column we pressed if there are any - if (result && Columns.size() > 0) + if (result && !Columns.empty()) { bool found = false; int32_t x = 0; diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index 48de73d370..3e6e79932d 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -897,7 +897,7 @@ namespace OpenRCT2::Ui::Windows } // Add window tabs - if (_info.Desc.Tabs.size() != 0) + if (!_info.Desc.Tabs.empty()) { widgetList[WIDX_CONTENT_PANEL].top = kTabBarHeight; } @@ -919,7 +919,7 @@ namespace OpenRCT2::Ui::Windows // Add custom widgets auto totalWidgets = _info.Desc.Widgets.size(); auto tabWidgetsOffset = totalWidgets; - if (_info.Desc.Tabs.size() != 0) + if (!_info.Desc.Tabs.empty()) { totalWidgets += _info.Desc.Tabs[page].Widgets.size(); } @@ -1271,7 +1271,7 @@ namespace OpenRCT2::Ui::Windows auto& widget = w->widgets[widgetIndex]; auto lastSelectedIndex = customWidgetInfo->SelectedIndex; - if (customWidgetInfo->Items.size() == 0) + if (customWidgetInfo->Items.empty()) { selectedIndex = -1; } diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 87d52ec478..4ffba953bc 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -1274,7 +1274,7 @@ namespace OpenRCT2::Ui::Windows } FootpathUpdateProvisional(); - if (_provisionalFootpath.tiles.size() == 0) + if (_provisionalFootpath.tiles.empty()) return; // Try and place path @@ -1946,7 +1946,7 @@ namespace OpenRCT2::Ui::Windows FootpathRemoveProvisional(); GameActions::Result res; - std::vector succesfulTiles{}; + std::vector successfulTiles{}; money64 cost = 0; for (const auto& tile : tiles) { @@ -1958,20 +1958,20 @@ namespace OpenRCT2::Ui::Windows // from glitching through the existing path. if (res.error == GameActions::Status::ok || res.error == GameActions::Status::itemAlreadyPlaced) { - succesfulTiles.emplace_back(tile); + successfulTiles.emplace_back(tile); cost += res.cost; } } - bool anySuccesful = succesfulTiles.size() > 0; - if (anySuccesful) + bool anySuccessful = (!successfulTiles.empty()); + if (anySuccessful) { _provisionalFootpath.surfaceIndex = type; _provisionalFootpath.railingsIndex = railingsType; _provisionalFootpath.positionA = footpathLocA; _provisionalFootpath.positionB = footpathLocB; _provisionalFootpath.startZ = startZ; - _provisionalFootpath.tiles = succesfulTiles; + _provisionalFootpath.tiles = successfulTiles; _provisionalFootpath.constructFlags = constructFlags; _provisionalFootpath.flags.set(ProvisionalPathFlag::placed); @@ -1987,26 +1987,26 @@ namespace OpenRCT2::Ui::Windows if (!isToolActive(WindowClass::scenery)) { - if (succesfulTiles.size() == 0) + if (successfulTiles.empty()) { // If we can't build this, don't show a virtual floor. VirtualFloorSetHeight(0); } else if ( - succesfulTiles[0].slope.type == FootpathSlopeType::flat - || succesfulTiles[0].position.z < _footpathConstructFromPosition.z) + successfulTiles[0].slope.type == FootpathSlopeType::flat + || successfulTiles[0].position.z < _footpathConstructFromPosition.z) { // Going either straight on, or down. - VirtualFloorSetHeight(succesfulTiles[0].position.z); + VirtualFloorSetHeight(successfulTiles[0].position.z); } else { // Going up in the world! - VirtualFloorSetHeight(succesfulTiles[0].position.z + kLandHeightStep); + VirtualFloorSetHeight(successfulTiles[0].position.z + kLandHeightStep); } } - return anySuccesful ? cost : kMoney64Undefined; + return anySuccessful ? cost : kMoney64Undefined; } /** diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 082d2f9c38..4bb5c05ae6 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -2846,7 +2846,7 @@ namespace OpenRCT2::Ui::Windows auto& objManager = GetContext()->GetObjectManager(); auto& rideEntries = objManager.GetAllRideEntries(rideType); // If there are no vehicles for this ride type, enable all the track pieces. - if (rideEntries.size() == 0) + if (rideEntries.empty()) { disabledGroups.reset(); } diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index fe278f4104..a6e28311f1 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -552,7 +552,7 @@ namespace OpenRCT2::Ui::Windows const auto& rideManager = RideManager(gameState); auto allClosed = true; auto allOpen = false; - if (_rideList.size() > 0 && std::size(rideManager) != 0) + if (!_rideList.empty() && std::size(rideManager) != 0) { auto c = static_cast(page); allClosed = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& rideRef) { diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 0e854fdc47..b9bccb1489 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -825,7 +825,7 @@ namespace OpenRCT2::Ui::Windows } auto windowWidth = width; - if (_tabEntries.size() > 0) + if (!_tabEntries.empty()) { const auto lastTabIndex = GetMaxTabCountInARow() == kMaxTabsPerRow ? kMaxTabsPerRow - 1 : _tabEntries.size() - 1; @@ -916,7 +916,7 @@ namespace OpenRCT2::Ui::Windows auto sceneryObjectType = GetObjectTypeFromSceneryType(selectedSceneryEntry.SceneryType); auto& objManager = GetContext()->GetObjectManager(); auto sceneryObject = objManager.GetLoadedObject(sceneryObjectType, selectedSceneryEntry.EntryIndex); - if (sceneryObject != nullptr && sceneryObject->GetAuthors().size() > 0) + if (sceneryObject != nullptr && !sceneryObject->GetAuthors().empty()) { std::string authorsString; const auto& authors = sceneryObject->GetAuthors(); @@ -1007,7 +1007,7 @@ namespace OpenRCT2::Ui::Windows tabInfo.AddEntryToBack(sceneryEntry); } } - if (tabInfo.Entries.size() > 0) + if (!tabInfo.Entries.empty()) { _tabEntries.push_back(std::move(tabInfo)); } diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index ce25710223..e5f1ecd352 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -231,7 +231,7 @@ namespace OpenRCT2::Ui::Windows _reloadTrackDesigns = false; // Start with first track highlighted selectedListItem = 0; - if (_trackDesigns.size() != 0 && gLegacyScene != LegacyScene::trackDesignsManager) + if (!_trackDesigns.empty() && gLegacyScene != LegacyScene::trackDesignsManager) { selectedListItem = 1; } diff --git a/src/openrct2/AssetPackManager.cpp b/src/openrct2/AssetPackManager.cpp index f1c90edb93..60ba18326f 100644 --- a/src/openrct2/AssetPackManager.cpp +++ b/src/openrct2/AssetPackManager.cpp @@ -153,7 +153,7 @@ namespace OpenRCT2 if (i == csl.size() || csl[i] == ',') { auto el = csl.substr(elStart, i - elStart); - if (el.size() != 0) + if (!el.empty()) func(el); elStart = i + 1; } @@ -204,9 +204,9 @@ namespace OpenRCT2 enabledList.push_back(','); } } - if (orderList.size() > 0) + if (!orderList.empty()) orderList.pop_back(); - if (enabledList.size() > 0) + if (!enabledList.empty()) enabledList.pop_back(); Config::Get().general.assetPackOrder = orderList; Config::Get().general.enabledAssetPacks = enabledList; diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 50ff237949..2d8baea5f9 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -668,7 +668,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots else { CompareSpriteData(spriteBase, spriteCmp, changeData); - if (changeData.diffs.size() == 0) + if (changeData.diffs.empty()) { changeData.changeType = GameStateSpriteChange::EQUAL; } diff --git a/src/openrct2/command_line/ParkInfoCommands.cpp b/src/openrct2/command_line/ParkInfoCommands.cpp index faad51f252..e6ae881c66 100644 --- a/src/openrct2/command_line/ParkInfoCommands.cpp +++ b/src/openrct2/command_line/ParkInfoCommands.cpp @@ -124,7 +124,7 @@ namespace OpenRCT2 Console::WriteLine("ObjectType: %s, Number of Objects: %d", typeToName[EnumValue(objType)], list.size()); for (auto& obj : list) { - if (obj.Generation == ObjectGeneration::JSON && obj.Identifier.size() == 0) + if (obj.Generation == ObjectGeneration::JSON && obj.Identifier.empty()) { // Empty object slot don't output anything continue; diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index 67df65a161..00a7e9049b 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -178,7 +178,7 @@ struct DataSerializerTraitsT static void log(OpenRCT2::IStream* stream, const std::string& str) { stream->Write("\"", 1); - if (str.size() != 0) + if (!str.empty()) { stream->Write(str.data(), str.size()); } diff --git a/src/openrct2/core/Http.WinHttp.cpp b/src/openrct2/core/Http.WinHttp.cpp index 71e9d7f7dc..671841096f 100644 --- a/src/openrct2/core/Http.WinHttp.cpp +++ b/src/openrct2/core/Http.WinHttp.cpp @@ -90,7 +90,7 @@ namespace OpenRCT2::Http { // Ignore first header as that is the HTTP version which // we don't really count as a header. - if (index != 0 && wKey.size() != 0) + if (index != 0 && !wKey.empty()) { auto key = String::toUtf8(wKey); auto value = String::toUtf8(wValue); diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index abc6ef2326..47ea43aa92 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -185,7 +185,7 @@ namespace OpenRCT2::String */ constexpr std::optional utf8GetCodePointSize(std::string_view v) { - if (v.size() >= 1 && !(v[0] & 0x80)) + if (!v.empty() && !(v[0] & 0x80)) { return { 1 }; } diff --git a/src/openrct2/entity/EntityRegistry.cpp b/src/openrct2/entity/EntityRegistry.cpp index 26b7696aaf..3887aefce9 100644 --- a/src/openrct2/entity/EntityRegistry.cpp +++ b/src/openrct2/entity/EntityRegistry.cpp @@ -296,7 +296,7 @@ namespace OpenRCT2 EntityBase* EntityRegistry::CreateEntity(EntityType type) { - if (_freeIdList.size() == 0) + if (_freeIdList.empty()) { // No free sprites. return nullptr; diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index d83015b612..802b603966 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -1273,7 +1273,7 @@ static void ConsoleCommandForceDate([[maybe_unused]] InteractiveConsole& console int32_t year = 0; int32_t month = 0; int32_t day = 0; - if (argv.size() < 1 || argv.size() > 3) + if (argv.empty() || argv.size() > 3) { return; } @@ -1327,7 +1327,7 @@ static void ConsoleCommandForceDate([[maybe_unused]] InteractiveConsole& console static void ConsoleCommandLoadPark([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { - if (argv.size() < 1) + if (argv.empty()) { console.WriteLine("Parameters required "); return; @@ -1362,7 +1362,7 @@ static void ConsoleCommandLoadPark([[maybe_unused]] InteractiveConsole& console, static void ConsoleCommandSavePark([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { - if (argv.size() < 1) + if (argv.empty()) { SaveGameCmd(); } @@ -1398,7 +1398,7 @@ static void ConsoleCommandReplayStartRecord(InteractiveConsole& console, const a return; } - if (argv.size() < 1) + if (argv.empty()) { console.WriteFormatLine("Parameters required []"); return; @@ -1471,7 +1471,7 @@ static void ConsoleCommandReplayStart(InteractiveConsole& console, const argumen return; } - if (argv.size() < 1) + if (argv.empty()) { console.WriteFormatLine("Parameters required "); return; @@ -1556,7 +1556,7 @@ static void ConsoleCommandReplayNormalise(InteractiveConsole& console, const arg static void ConsoleCommandMpDesync(InteractiveConsole& console, const arguments_t& argv) { int32_t desyncType = 0; - if (argv.size() >= 1) + if (!argv.empty()) { desyncType = atoi(argv[0].c_str()); } @@ -1698,7 +1698,7 @@ static void ConsoleCommandProfilerStart([[maybe_unused]] InteractiveConsole& con static void ConsoleCommandProfilerExportCSV( [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { - if (argv.size() < 1) + if (argv.empty()) { console.WriteLineError("Missing argument: "); } @@ -1719,7 +1719,7 @@ static void ConsoleCommandProfilerStop([[maybe_unused]] InteractiveConsole& cons Profiling::Disable(); // Export to CSV if argument is provided. - if (argv.size() >= 1) + if (!argv.empty()) { return ConsoleCommandProfilerExportCSV(console, argv); } diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 8727068bdb..df8c92e9ab 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -790,7 +790,7 @@ namespace OpenRCT2::Network } } - if (colours.size() == 0 || (colours.size() == 1 && colours[0] == "{WHITE}")) + if (colours.empty() || (colours.size() == 1 && colours[0] == "{WHITE}")) { formatted += "{BABYBLUE}"; formatted += fromPlayer->Name; @@ -1677,7 +1677,7 @@ namespace OpenRCT2::Network { json_t jsonObj = { { "name", Config::Get().network.serverName }, - { "requiresPassword", _password.size() > 0 }, + { "requiresPassword", !_password.empty() }, { "version", GetVersion() }, { "players", GetNumVisiblePlayers() }, { "maxPlayers", Config::Get().network.maxplayers }, diff --git a/src/openrct2/object/ImageTable.cpp b/src/openrct2/object/ImageTable.cpp index 6d2da3f877..05fa2c029a 100644 --- a/src/openrct2/object/ImageTable.cpp +++ b/src/openrct2/object/ImageTable.cpp @@ -244,7 +244,7 @@ namespace OpenRCT2 } } - if (range.size() > 0) + if (!range.empty()) { size_t placeHoldersAdded = 0; for (auto i : range) diff --git a/src/openrct2/object/MusicObject.cpp b/src/openrct2/object/MusicObject.cpp index 33867b4391..be6e469293 100644 --- a/src/openrct2/object/MusicObject.cpp +++ b/src/openrct2/object/MusicObject.cpp @@ -194,7 +194,7 @@ namespace OpenRCT2 bool MusicObject::SupportsRideType(ride_type_t rideType, bool onlyAllowIfExplicitlyListed) { - if (_rideTypes.size() == 0) + if (_rideTypes.empty()) { // Some rides, like the merry-go-round, need music objects to explicitly list them. return !onlyAllowIfExplicitlyListed; diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index c6fd69746f..5a56031c98 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -194,7 +194,7 @@ namespace OpenRCT2 ObjectSourceGame Object::GetFirstSourceGame() const { - if (_sourceGames.size() == 0) + if (_sourceGames.empty()) return ObjectSourceGame::custom; return _sourceGames[0]; @@ -423,7 +423,7 @@ namespace OpenRCT2 { LOG_WARNING("%i fields found in version string '%s', expected X.Y.Z", nums.size(), version); } - if (nums.size() == 0) + if (nums.empty()) { LOG_WARNING("No fields found in version string '%s', expected X.Y.Z", version); return std::make_tuple(0, 0, 0); diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 1c96803edf..dd41969893 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -966,7 +966,7 @@ namespace OpenRCT2 for (size_t index = 0; index < jCarColours.size(); index++) { auto config = ReadJsonColourConfiguration(jCarColours[index]); - if (config.size() >= 1) + if (!config.empty()) { list.list[index] = config[0]; list.count++; @@ -990,7 +990,7 @@ namespace OpenRCT2 VehicleColour carColour = {}; auto colours = Json::AsArray(jColours); - if (colours.size() >= 1) + if (!colours.empty()) { carColour.Body = Drawing::colourFromString(Json::GetString(colours[0])); carColour.Trim = carColour.Body; diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 772ba176ef..be35606091 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -775,7 +775,7 @@ namespace OpenRCT2 static constexpr uint8_t DESCRIPTOR_DAT = 0; static constexpr uint8_t DESCRIPTOR_PARKOBJ = 1; - if (os.getMode() == OrcaStream::Mode::writing && ExportObjectsList.size() == 0) + if (os.getMode() == OrcaStream::Mode::writing && ExportObjectsList.empty()) { // Do not emit chunk if there are no packed objects return; @@ -2188,7 +2188,7 @@ namespace OpenRCT2 { value = std::get<1>(*fr); } - else if (table.size() > 0) + else if (!table.empty()) { value = std::get<1>(table[0]); } diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index a6f5e15488..1fb200a892 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1618,7 +1618,7 @@ namespace OpenRCT2::RCT1 } // Set last element flag in case the original last element was never added - if (tileElements.size() > 0) + if (!tileElements.empty()) { tileElements.back().SetLastForTile(true); } diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index f84180edbc..fad4138650 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1292,7 +1292,7 @@ namespace OpenRCT2::RCT2 } // Set last element flag in case the original last element was never added - if (tileElements.size() > 0) + if (!tileElements.empty()) { tileElements.back().SetLastForTile(true); } diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index fc3e722c9d..a964bd6855 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -2246,7 +2246,7 @@ int32_t RideGetUnusedPresetVehicleColour(ObjectEntryIndex subType) } // If all presets have been used, just go with a random preset - if (unused.size() == 0) + if (unused.empty()) return UtilRand() % colourPresets->count; // Choose a random preset from the list of unused presets @@ -4326,7 +4326,7 @@ int32_t RideGetRandomColourPresetIndex(ride_type_t rideType) } // If all presets have been used, just go with a random preset - if (unused.size() == 0) + if (unused.empty()) return UtilRand() % colourPresets.count; // Choose a random preset from the list of unused presets @@ -5557,7 +5557,7 @@ ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSu { auto& objManager = GetContext()->GetObjectManager(); auto& rideEntries = objManager.GetAllRideEntries(rideType); - if (rideEntries.size() > 0) + if (!rideEntries.empty()) { subType = rideEntries[0]; for (auto rideEntryIndex : rideEntries) diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index b4820c1391..db9c2537aa 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -959,7 +959,7 @@ void ScriptEngine::CheckAndStartPlugins() void ScriptEngine::ProcessREPL() { - while (_evalQueue.size() > 0) + while (!_evalQueue.empty()) { auto item = std::move(_evalQueue.front()); _evalQueue.pop(); diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index 4f2580b9eb..f7cb9b4518 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -471,7 +471,7 @@ void DeleteBanner(BannerIndex id) void TrimBanners() { auto& gameState = getGameState(); - if (gameState.banners.size() > 0) + if (!gameState.banners.empty()) { auto lastBannerId = gameState.banners.size() - 1; while (lastBannerId != std::numeric_limits::max() && gameState.banners[lastBannerId].isNull()) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 57d96db4a1..20f726ad7c 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -1097,7 +1097,7 @@ static int32_t FootpathIsConnectedToMapEdgeHelper(CoordsXYZ footpathPos, int32_t // Loads the next tile to visit into our variables auto LoadNextTileElement = [&tiles, &numPendingTiles](TileState& t_currentTile) -> void { // Do not continue if there are no tiles in the list - if (tiles.size() == 0) + if (tiles.empty()) return; // Find the next unprocessed tile