From c4ea5732ea9eafa1e24a62dd086fd846b3a78d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 21 Oct 2021 19:57:59 +0300 Subject: [PATCH] Refactor explicit constructor usage in LargeSceneryRemoveAction --- src/openrct2/actions/LargeSceneryRemoveAction.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index 79767bbc3e..4cc356603b 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -65,13 +65,13 @@ GameActions::Result::Ptr LargeSceneryRemoveAction::Query() const if (tileElement == nullptr) { log_warning("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); - return MakeResult(GameActions::Status::InvalidParameters, STR_INVALID_SELECTION_OF_OBJECTS); + return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS); } auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); // If we have a bugged scenery entry, do not touch the tile element. if (sceneryEntry == nullptr) - return MakeResult(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS); + return MakeResult(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_NONE); auto rotatedOffsets = CoordsXYZ{ CoordsXY{ sceneryEntry->tiles[_tileIndex].x_offset, sceneryEntry->tiles[_tileIndex].y_offset }.Rotate(_loc.direction), @@ -135,13 +135,13 @@ GameActions::Result::Ptr LargeSceneryRemoveAction::Execute() const if (tileElement == nullptr) { log_warning("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); - return MakeResult(GameActions::Status::InvalidParameters, STR_INVALID_SELECTION_OF_OBJECTS); + return MakeResult(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS); } auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); // If we have a bugged scenery entry, do not touch the tile element. if (sceneryEntry == nullptr) - return MakeResult(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS); + return MakeResult(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_NONE); tileElement->RemoveBannerEntry();