Remove some assertions on tile accessors in non-debug builds

This commit is contained in:
Jonathan G Rennison
2019-01-19 04:28:06 +00:00
parent 7c539267ed
commit f763b5d5e0

View File

@@ -30,7 +30,10 @@
*/
static inline uint TileHeight(TileIndex tile)
{
/* this method is inlined in many places and is performance-critical, drop assertion in non-debug builds */
#ifdef _DEBUG
assert_msg(tile < MapSize(), "tile: 0x%X, size: 0x%X", tile, MapSize());
#endif
return _m[tile].height;
}
@@ -88,7 +91,10 @@ static inline uint TilePixelHeightOutsideMap(int x, int y)
*/
static inline TileType GetTileType(TileIndex tile)
{
/* this method is inlined in many places and is performance-critical, drop assertion in non-debug builds */
#ifdef _DEBUG
assert_msg(tile < MapSize(), "tile: 0x%X, size: 0x%X", tile, MapSize());
#endif
return (TileType)GB(_m[tile].type, 4, 4);
}