You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07: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