mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 04:59:11 +00:00
(svn r12758) -Fix(r4712, r12745): Use a bool when it's about boolean evaluation. a TileIndex is hardly a bool, of course of course. Thanks for good old MSVC warnings.
This commit is contained in:
@@ -91,12 +91,12 @@ static inline TileIndex GetOtherShipDepotTile(TileIndex t)
|
|||||||
return t + (HasBit(_m[t].m5, 0) ? -1 : 1) * (HasBit(_m[t].m5, 1) ? TileDiffXY(0, 1) : TileDiffXY(1, 0));
|
return t + (HasBit(_m[t].m5, 0) ? -1 : 1) * (HasBit(_m[t].m5, 1) ? TileDiffXY(0, 1) : TileDiffXY(1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TileIndex IsShipDepot(TileIndex t)
|
static inline bool IsShipDepot(TileIndex t)
|
||||||
{
|
{
|
||||||
return IsInsideMM(_m[t].m5, DEPOT_NORTH, DEPOT_END);
|
return IsInsideMM(_m[t].m5, DEPOT_NORTH, DEPOT_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TileIndex IsShipDepotTile(TileIndex t)
|
static inline bool IsShipDepotTile(TileIndex t)
|
||||||
{
|
{
|
||||||
return IsTileType(t, MP_WATER) && IsShipDepot(t);
|
return IsTileType(t, MP_WATER) && IsShipDepot(t);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user