Codechange: make strongtype constructor explicit
This commit is contained in:
@@ -442,6 +442,9 @@ inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
|
||||
return TileDiffXY(tidc.x, tidc.y);
|
||||
}
|
||||
|
||||
/* Helper functions to provide explicit +=/-= operators for TileIndex and TileIndexDiff. */
|
||||
constexpr TileIndex &operator+=(TileIndex &tile, TileIndexDiff offset) { tile = tile + TileIndex(offset); return tile; }
|
||||
constexpr TileIndex &operator-=(TileIndex &tile, TileIndexDiff offset) { tile = tile - TileIndex(offset); return tile; }
|
||||
|
||||
/**
|
||||
* Adds a given offset to a tile.
|
||||
|
||||
Reference in New Issue
Block a user