Remove some assertions on tile accessors in non-debug builds
This commit is contained in:
@@ -30,7 +30,10 @@
|
|||||||
*/
|
*/
|
||||||
static inline uint TileHeight(TileIndex tile)
|
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());
|
assert_msg(tile < MapSize(), "tile: 0x%X, size: 0x%X", tile, MapSize());
|
||||||
|
#endif
|
||||||
return _m[tile].height;
|
return _m[tile].height;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +91,10 @@ static inline uint TilePixelHeightOutsideMap(int x, int y)
|
|||||||
*/
|
*/
|
||||||
static inline TileType GetTileType(TileIndex tile)
|
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());
|
assert_msg(tile < MapSize(), "tile: 0x%X, size: 0x%X", tile, MapSize());
|
||||||
|
#endif
|
||||||
return (TileType)GB(_m[tile].type, 4, 4);
|
return (TileType)GB(_m[tile].type, 4, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user