summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-07 10:09:28 +0000
committertron <tron@openttd.org>2005-02-07 10:09:28 +0000
commit89482008d8e8de10406da419671f0b7f9010ed62 (patch)
treeba6d7baee1f79207c5b02f6db96a3e843c02ab41
parent8f741f44c4ef44d49f1f33dea9d41e3a17ef5fe7 (diff)
downloadopenttd-89482008d8e8de10406da419671f0b7f9010ed62.tar.xz
(svn r1837) GetTileOwner returns Owner, not bool
Also assert() that the TileIndex is valid
-rw-r--r--tile.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tile.h b/tile.h
index bcb06d29d..6943f4a0e 100644
--- a/tile.h
+++ b/tile.h
@@ -57,8 +57,9 @@ static inline bool IsTileType(TileIndex tile, TileType type)
return GetTileType(tile) == type;
}
-static inline bool GetTileOwner(TileIndex tile)
+static inline Owner GetTileOwner(TileIndex tile)
{
+ assert(tile < MapSize());
return _map_owner[tile];
}