forked from rosebudai/OpenRCT2-Web
Use vector over initializer_list on FixLandOwnershipTilesWithOwnership
This commit is contained in:
1 parent
194a63c7dc
commit
fe69dbb2ea
2 files changed
+4
-5
No files matched your search
@@ -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