diff options
author | smatz <smatz@openttd.org> | 2009-06-26 14:02:27 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-26 14:02:27 +0000 |
commit | b668c24d463ca8059fd9be59efddb39298de9646 (patch) | |
tree | 5fbd935d6d1dc65d5ebc160333b25c09e2e5b6c7 /src/house.h | |
parent | af78d6a9bbc4142958f07b8774ef28d0b7c22f49 (diff) | |
download | openttd-b668c24d463ca8059fd9be59efddb39298de9646.tar.xz |
(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[]
Diffstat (limited to 'src/house.h')
-rw-r--r-- | src/house.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/house.h b/src/house.h index bbe98845e..b2253c711 100644 --- a/src/house.h +++ b/src/house.h @@ -122,14 +122,12 @@ struct HouseSpec { */ Money GetRemovalCost() const; + static FORCEINLINE HouseSpec *Get(size_t house_id) + { + assert(house_id < HOUSE_MAX); + extern HouseSpec _house_specs[]; + return &_house_specs[house_id]; + } }; -extern HouseSpec _house_specs[]; - -static inline HouseSpec *GetHouseSpecs(HouseID house_id) -{ - assert(house_id < HOUSE_MAX); - return &_house_specs[house_id]; -} - #endif /* HOUSE_H */ |