diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-11-06 23:11:22 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | b0990fcff7358e839468e5cf811ffddc8b9d73e2 (patch) | |
tree | 08da5cbe48d5dcc46e8c539e0da1aa8f6233bad9 /src/map_func.h | |
parent | 4fc055d6e97e76faf53ff3f29e36a4a4549bf6e7 (diff) | |
download | openttd-b0990fcff7358e839468e5cf811ffddc8b9d73e2.tar.xz |
Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
Diffstat (limited to 'src/map_func.h')
-rw-r--r-- | src/map_func.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map_func.h b/src/map_func.h index b02ba5777..34cc5ee0e 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -204,7 +204,7 @@ static inline TileIndex TileVirtXY(uint x, uint y) */ static inline uint TileX(TileIndex tile) { - return tile & MapMaxX(); + return tile.value & MapMaxX(); } /** @@ -214,7 +214,7 @@ static inline uint TileX(TileIndex tile) */ static inline uint TileY(TileIndex tile) { - return tile >> MapLogX(); + return tile.value >> MapLogX(); } /** |