mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
Use constexpr where applicable in Viewport.cpp
This commit is contained in:
@@ -239,7 +239,12 @@ CoordsXYZ viewport_adjust_for_map_height(const ScreenCoordsXY& startCoords)
|
||||
auto max = GetMapSizeMinus2();
|
||||
if (pos.x > max && pos.y > max)
|
||||
{
|
||||
const CoordsXY corr[] = { { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 } };
|
||||
static constexpr CoordsXY corr[] = {
|
||||
{ -1, -1 },
|
||||
{ 1, -1 },
|
||||
{ 1, 1 },
|
||||
{ -1, 1 },
|
||||
};
|
||||
pos.x += corr[rotation].x * height;
|
||||
pos.y += corr[rotation].y * height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user