mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Use vector over initializer_list on FixLandOwnershipTilesWithOwnership
This commit is contained in:
@@ -2200,11 +2200,11 @@ uint16_t CheckMaxAllowableLandRightsForTile(const CoordsXYZ& tileMapPos)
|
||||
return destOwnership;
|
||||
}
|
||||
|
||||
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade)
|
||||
void FixLandOwnershipTilesWithOwnership(std::vector<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade)
|
||||
{
|
||||
for (const TileCoordsXY* tile = tiles.begin(); tile != tiles.end(); ++tile)
|
||||
for (const auto& tile : tiles)
|
||||
{
|
||||
auto surfaceElement = MapGetSurfaceElementAt(*tile);
|
||||
auto surfaceElement = MapGetSurfaceElementAt(tile);
|
||||
if (surfaceElement != nullptr)
|
||||
{
|
||||
if (doNotDowngrade && surfaceElement->GetOwnership() == OWNERSHIP_OWNED)
|
||||
|
||||
@@ -232,7 +232,6 @@ bool MapIsLocationAtEdge(const CoordsXY& loc);
|
||||
|
||||
uint16_t CheckMaxAllowableLandRightsForTile(const CoordsXYZ& tileMapPos);
|
||||
|
||||
void FixLandOwnershipTilesWithOwnership(
|
||||
std::initializer_list<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade = false);
|
||||
void FixLandOwnershipTilesWithOwnership(std::vector<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade = false);
|
||||
MapRange ClampRangeWithinMap(const MapRange& range);
|
||||
void ShiftMap(const TileCoordsXY& amount);
|
||||
|
||||
Reference in New Issue
Block a user