From 42ed287506467b8e3f58e7b909297dec5834c0e1 Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 4 Apr 2008 14:53:06 +0000 Subject: (svn r12560) -Cleanup: town_cmd.cpp and header files - variable scope and a bit of coding style --- src/town.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/town.h') diff --git a/src/town.h b/src/town.h index 3f5f2bd84..9e01b7771 100644 --- a/src/town.h +++ b/src/town.h @@ -47,12 +47,17 @@ enum BuildingFlags { DECLARE_ENUM_AS_BIT_SET(BuildingFlags) enum HouseZonesBits { + HZB_BEGIN = 0, HZB_TOWN_EDGE = 0, HZB_TOWN_OUTSKIRT, HZB_TOWN_OUTER_SUBURB, HZB_TOWN_INNER_SUBURB, HZB_TOWN_CENTRE, + HZB_END, }; +assert_compile(HZB_END == 5); + +DECLARE_POSTFIX_INCREMENT(HouseZonesBits) enum HouseZones { ///< Bit Value Meaning HZ_NOZNS = 0x0000, ///< 0 This is just to get rid of zeros, meaning none @@ -158,7 +163,7 @@ struct Town : PoolItem { bool larger_town; /* NOSAVE: UpdateTownRadius updates this given the house count. */ - uint16 radius[5]; + uint16 radius[HZB_END]; /* NOSAVE: The number of each type of building in the town. */ BuildingCounts building_counts; -- cgit v1.2.3-54-g00ecf