(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[]

This commit is contained in:
smatz
2009-06-26 14:02:27 +00:00
parent af78d6a9bb
commit b668c24d46
7 changed files with 57 additions and 56 deletions

View File

@@ -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 */