From 844a28f3f5f621bd5a871f1b09301c2e1c423b76 Mon Sep 17 00:00:00 2001 From: Trevor Harkness Date: Fri, 19 Apr 2019 02:18:55 -0400 Subject: [PATCH] Fix formatting and added to contributors.md Adjusted formatting for CI tests --- contributors.md | 2 ++ src/openrct2-ui/windows/TopToolbar.cpp | 2 +- src/openrct2/actions/LargeSceneryPlaceAction.hpp | 12 +++++------- src/openrct2/actions/SmallSceneryPlaceAction.hpp | 14 ++++++++------ 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/contributors.md b/contributors.md index 9af5276289..b22ee9eda9 100644 --- a/contributors.md +++ b/contributors.md @@ -126,6 +126,8 @@ The following people are not part of the development team, but have been contrib * Zetao Ye (ZbrettonYe) * Jordan Arevalos (Jarevalos2017) * Florian Will (w-flo) +* Trevor Harkness (tharkne) +* Steve Xu (stevexu-umich) ## Toolchain * (Balletie) - macOS diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 06a2d52693..1b385efef5 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -2581,7 +2581,7 @@ static money32 try_place_ghost_scenery( tileElement = gSceneryTileElement; gSceneryGhostPosition.z = tileElement->base_height; - + if (dynamic_cast(res.get())->GroundFlags & ELEMENT_IS_UNDERGROUND) { // Set underground on diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.hpp b/src/openrct2/actions/LargeSceneryPlaceAction.hpp index a9cc764e74..ff3f2e4090 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.hpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.hpp @@ -24,7 +24,7 @@ class LargeSceneryPlaceActionResult final : public GameActionResult public: LargeSceneryPlaceActionResult() : GameActionResult(GA_ERROR::OK, STR_CANT_POSITION_THIS_HERE) - { + { } LargeSceneryPlaceActionResult(GA_ERROR error) : GameActionResult(error, STR_CANT_POSITION_THIS_HERE) @@ -84,7 +84,7 @@ public: res->Position.z = surfaceHeight; res->GroundFlags = 0; - + BannerIndex bannerId = BANNER_INDEX_NULL; money32 supportsCost = 0; @@ -170,7 +170,7 @@ public: if (res->GroundFlags && !(res->GroundFlags & tempSceneryGroundFlags)) { return std::make_unique( - GA_ERROR::DISALLOWED, STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND); + GA_ERROR::DISALLOWED, STR_CANT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_GROUND); } } @@ -178,15 +178,13 @@ public: if (curTile.x >= gMapSizeUnits || curTile.y >= gMapSizeUnits) { - return std::make_unique( - GA_ERROR::DISALLOWED, STR_OFF_EDGE_OF_MAP); + return std::make_unique(GA_ERROR::DISALLOWED, STR_OFF_EDGE_OF_MAP); } if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !map_is_location_owned(curTile.x, curTile.y, zLow * 8) && !gCheatsSandboxMode) { - return std::make_unique( - GA_ERROR::DISALLOWED, STR_LAND_NOT_OWNED_BY_PARK); + return std::make_unique(GA_ERROR::DISALLOWED, STR_LAND_NOT_OWNED_BY_PARK); } } diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.hpp b/src/openrct2/actions/SmallSceneryPlaceAction.hpp index 43f25d817d..40aca0778c 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.hpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.hpp @@ -32,7 +32,7 @@ class SmallSceneryPlaceActionResult final : public GameActionResult public: SmallSceneryPlaceActionResult() : GameActionResult(GA_ERROR::OK, STR_CANT_POSITION_THIS_HERE) - { + { } SmallSceneryPlaceActionResult(GA_ERROR error) : GameActionResult(error, STR_CANT_POSITION_THIS_HERE) @@ -193,7 +193,7 @@ public: { if (isOnWater) { - return std::make_unique(GA_ERROR::DISALLOWED, STR_CAN_ONLY_BUILD_THIS_ON_LAND); + return std::make_unique(GA_ERROR::DISALLOWED, STR_CAN_ONLY_BUILD_THIS_ON_LAND); } if (surfaceElement != nullptr && surfaceElement->AsSurface()->GetWaterHeight() > 0) @@ -209,7 +209,7 @@ public: && (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) && !supportsRequired && !isOnWater && surfaceElement != nullptr && (surfaceElement->AsSurface()->GetSlope() != TILE_ELEMENT_SLOPE_FLAT)) { - return std::make_unique(GA_ERROR::DISALLOWED, STR_LEVEL_LAND_REQUIRED); + return std::make_unique(GA_ERROR::DISALLOWED, STR_LEVEL_LAND_REQUIRED); } if (!gCheatsDisableSupportLimits && !(scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_STACKABLE)) @@ -275,7 +275,8 @@ public: _loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags(), &clearCost, CREATE_CROSSING_MODE_NONE)) { - return std::make_unique(GA_ERROR::DISALLOWED, gGameCommandErrorText, gCommonFormatArgs); + return std::make_unique( + GA_ERROR::DISALLOWED, gGameCommandErrorText, gCommonFormatArgs); } res->GroundFlags = gMapGroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); @@ -312,7 +313,7 @@ public: rct_scenery_entry* sceneryEntry = get_small_scenery_entry(_sceneryType); if (sceneryEntry == nullptr) { - return std::make_unique(GA_ERROR::INVALID_PARAMETERS); + return std::make_unique(GA_ERROR::INVALID_PARAMETERS); } auto quadrant = _quadrant; @@ -406,7 +407,8 @@ public: _loc.x, _loc.y, zLow, zHigh, &map_place_scenery_clear_func, quarterTile, GetFlags() | GAME_COMMAND_FLAG_APPLY, &clearCost, CREATE_CROSSING_MODE_NONE)) { - return std::make_unique(GA_ERROR::DISALLOWED, gGameCommandErrorText, gCommonFormatArgs); + return std::make_unique( + GA_ERROR::DISALLOWED, gGameCommandErrorText, gCommonFormatArgs); } res->GroundFlags = gMapGroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND);