From fb95154000dd76604178e9b3c863b352d0030bf4 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Mon, 25 Nov 2019 23:08:31 -0300 Subject: [PATCH] Use operator -= and += of CoordsXY --- src/openrct2-ui/interface/ViewportInteraction.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 8d0d9ecdd5..5c17bbf183 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -560,12 +560,10 @@ void viewport_interaction_remove_park_entrance(TileElement* tileElement, CoordsX switch (tileElement->AsEntrance()->GetSequenceIndex()) { case 1: - mapCoords.x += CoordsDirectionDelta[rotation].x; - mapCoords.y += CoordsDirectionDelta[rotation].y; + mapCoords += CoordsDirectionDelta[rotation]; break; case 2: - mapCoords.x -= CoordsDirectionDelta[rotation].x; - mapCoords.y -= CoordsDirectionDelta[rotation].y; + mapCoords -= CoordsDirectionDelta[rotation]; break; } auto parkEntranceRemoveAction = ParkEntranceRemoveAction({ mapCoords.x, mapCoords.y, tileElement->base_height * 8 });