diff options
author | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
commit | 1c9bec19993417b1f3b240f2bdb0745aa26c0cb3 (patch) | |
tree | d09407cc962ee87ac1bbbbc60951cad74c6b1db7 /src/station_base.h | |
parent | 7a38642a1c83531a65907ae784bc03a82d35132a (diff) | |
download | openttd-1c9bec19993417b1f3b240f2bdb0745aa26c0cb3.tar.xz |
(svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC)
Diffstat (limited to 'src/station_base.h')
-rw-r--r-- | src/station_base.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/station_base.h b/src/station_base.h index a495f1691..d49c6491d 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -89,7 +89,7 @@ struct Airport : public TileArea { } /** Check if this airport has at least one hangar. */ - FORCEINLINE bool HasHangar() const + inline bool HasHangar() const { return this->GetSpec()->nof_depots > 0; } @@ -102,7 +102,7 @@ struct Airport : public TileArea { * @param tidc The tilediff to add to the airport tile. * @return The tile of this airport plus the rotated offset. */ - FORCEINLINE TileIndex GetRotatedTileFromOffset(TileIndexDiffC tidc) const + inline TileIndex GetRotatedTileFromOffset(TileIndexDiffC tidc) const { const AirportSpec *as = this->GetSpec(); switch (this->rotation) { @@ -124,7 +124,7 @@ struct Airport : public TileArea { * @pre hangar_num < GetNumHangars(). * @return A tile with the given hangar. */ - FORCEINLINE TileIndex GetHangarTile(uint hangar_num) const + inline TileIndex GetHangarTile(uint hangar_num) const { const AirportSpec *as = this->GetSpec(); for (uint i = 0; i < as->nof_depots; i++) { @@ -141,7 +141,7 @@ struct Airport : public TileArea { * @pre IsHangarTile(tile). * @return The exit direction of the hangar, taking airport rotation into account. */ - FORCEINLINE Direction GetHangarExitDirection(TileIndex tile) const + inline Direction GetHangarExitDirection(TileIndex tile) const { const AirportSpec *as = this->GetSpec(); const HangarTileTable *htt = GetHangarDataByTile(tile); @@ -154,14 +154,14 @@ struct Airport : public TileArea { * @pre IsHangarTile(tile). * @return The hangar number of the hangar at the given tile. */ - FORCEINLINE uint GetHangarNum(TileIndex tile) const + inline uint GetHangarNum(TileIndex tile) const { const HangarTileTable *htt = GetHangarDataByTile(tile); return htt->hangar_num; } /** Get the number of hangars on this airport. */ - FORCEINLINE uint GetNumHangars() const + inline uint GetNumHangars() const { uint num = 0; uint counted = 0; @@ -182,7 +182,7 @@ private: * @return The requested hangar information. * @pre The \a tile must be at a hangar tile at an airport. */ - FORCEINLINE const HangarTileTable *GetHangarDataByTile(TileIndex tile) const + inline const HangarTileTable *GetHangarDataByTile(TileIndex tile) const { const AirportSpec *as = this->GetSpec(); for (uint i = 0; i < as->nof_depots; i++) { @@ -245,12 +245,12 @@ public: uint GetCatchmentRadius() const; Rect GetCatchmentRect() const; - /* virtual */ FORCEINLINE bool TileBelongsToRailStation(TileIndex tile) const + /* virtual */ inline bool TileBelongsToRailStation(TileIndex tile) const { return IsRailStationTile(tile) && GetStationIndex(tile) == this->index; } - FORCEINLINE bool TileBelongsToAirport(TileIndex tile) const + inline bool TileBelongsToAirport(TileIndex tile) const { return IsAirportTile(tile) && GetStationIndex(tile) == this->index; } @@ -277,7 +277,7 @@ public: if (!st->TileBelongsToAirport(this->tile)) ++(*this); } - FORCEINLINE TileIterator& operator ++() + inline TileIterator& operator ++() { (*this).OrthogonalTileIterator::operator++(); while (this->tile != INVALID_TILE && !st->TileBelongsToAirport(this->tile)) { |