Codechange: add annotation to selectively force inlining in debug build

This commit is contained in:
Rubidium
2023-01-24 22:50:53 +01:00
committed by rubidium42
parent df89c34e03
commit b7a5d8e296
10 changed files with 102 additions and 37 deletions

View File

@@ -26,7 +26,7 @@
* @return the height of the tile
* @pre tile < Map::Size()
*/
static inline uint TileHeight(TileIndex tile)
debug_inline static uint TileHeight(TileIndex tile)
{
assert(tile < Map::Size());
return _m[tile].height;
@@ -93,7 +93,7 @@ static inline uint TilePixelHeightOutsideMap(int x, int y)
* @return The tiletype of the tile
* @pre tile < Map::Size()
*/
static inline TileType GetTileType(TileIndex tile)
debug_inline static TileType GetTileType(TileIndex tile)
{
assert(tile < Map::Size());
return (TileType)GB(_m[tile].type, 4, 4);
@@ -147,7 +147,7 @@ static inline void SetTileType(TileIndex tile, TileType type)
* @param type The type to check against
* @return true If the type matches against the type of the tile
*/
static inline bool IsTileType(TileIndex tile, TileType type)
debug_inline static bool IsTileType(TileIndex tile, TileType type)
{
return GetTileType(tile) == type;
}