From 79ab832000fcaba1bb1f9c2b1ff3e4217f47f15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Tue, 7 Sep 2021 22:20:13 +0300 Subject: [PATCH] Fix overload resolution for map_get_first_element_at --- src/openrct2/peep/Peep.cpp | 2 +- src/openrct2/ride/TrackDesign.cpp | 4 ++-- src/openrct2/ride/Vehicle.cpp | 2 +- src/openrct2/ride/transport/Chairlift.cpp | 2 +- src/openrct2/world/Map.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 7b1d0e5b3e..7eff568503 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -713,7 +713,7 @@ void Peep::UpdateFalling() } // If not drowning then falling. Note: peeps 'fall' after leaving a ride/enter the park. - TileElement* tile_element = map_get_first_element_at({ x, y }); + TileElement* tile_element = map_get_first_element_at(CoordsXY{ x, y }); TileElement* saved_map = nullptr; int32_t saved_height = 0; diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 33bf8c9732..9adc725a45 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -351,7 +351,7 @@ rct_string_id TrackDesign::CreateTrackDesignMaze(const Ride& ride) { for (; x < MAXIMUM_MAP_SIZE_BIG; x += COORDS_XY_STEP) { - auto tileElement = map_get_first_element_at({ x, y }); + auto tileElement = map_get_first_element_at(CoordsXY{ x, y }); do { if (tileElement == nullptr) @@ -457,7 +457,7 @@ CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) { for (tile.x = 0; tile.x < MAXIMUM_MAP_SIZE_BIG; tile.x += COORDS_XY_STEP) { - tile.element = map_get_first_element_at({ tile.x, tile.y }); + tile.element = map_get_first_element_at(CoordsXY{ tile.x, tile.y }); do { if (tile.element == nullptr) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 369f6121a0..2a1f0f47cf 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -1897,7 +1897,7 @@ void Vehicle::UpdateMeasurements() { // Set tile_element to first element. Since elements aren't always ordered by base height, // we must start at the first element and iterate through each tile element. - auto tileElement = map_get_first_element_at({ x, y }); + auto tileElement = map_get_first_element_at(CoordsXY{ x, y }); if (tileElement == nullptr) return; diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index db0b0a2950..101f424449 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -110,7 +110,7 @@ static void chairlift_paint_util_draw_supports(paint_session* session, int32_t s static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( int32_t x, int32_t y, int32_t z, const Ride* ride) { - const TileElement* tileElement = map_get_first_element_at({ x, y }); + const TileElement* tileElement = map_get_first_element_at(CoordsXY{ x, y }); if (tileElement == nullptr) { return nullptr; diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 427f27480a..d58c895a61 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -243,7 +243,7 @@ void tile_element_iterator_begin(tile_element_iterator* it) { it->x = 0; it->y = 0; - it->element = map_get_first_element_at({ 0, 0 }); + it->element = map_get_first_element_at(TileCoordsXY{ 0, 0 }); } int32_t tile_element_iterator_next(tile_element_iterator* it)