1
0
Fork 0

(svn r19507) -Codechange: remove semicolon after DECLARE_POSTFIX_INCREMENT and DECLARE_ENUM_AS_BIT_SET

release/1.1
smatz 2010-03-23 22:25:43 +00:00
parent f45e579923
commit 53aaabe6e9
44 changed files with 57 additions and 57 deletions

View File

@ -230,6 +230,6 @@ public:
static uint32 GetAutoRenewMoney(CompanyID company); static uint32 GetAutoRenewMoney(CompanyID company);
}; };
DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID); DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID)
#endif /* AI_COMPANY_HPP */ #endif /* AI_COMPANY_HPP */

View File

@ -503,6 +503,6 @@ public:
*/ */
static bool UnshareOrders(VehicleID vehicle_id); static bool UnshareOrders(VehicleID vehicle_id);
}; };
DECLARE_ENUM_AS_BIT_SET(AIOrder::AIOrderFlags); DECLARE_ENUM_AS_BIT_SET(AIOrder::AIOrderFlags)
#endif /* AI_ORDER_HPP */ #endif /* AI_ORDER_HPP */

View File

@ -156,6 +156,6 @@ public:
static TownID GetNearestTown(StationID station_id); static TownID GetNearestTown(StationID station_id);
}; };
DECLARE_ENUM_AS_BIT_SET(AIStation::StationType); DECLARE_ENUM_AS_BIT_SET(AIStation::StationType)
#endif /* AI_STATION_HPP */ #endif /* AI_STATION_HPP */

View File

@ -71,6 +71,6 @@ public:
static bool HasWaypointType(StationID waypoint_id, WaypointType waypoint_type); static bool HasWaypointType(StationID waypoint_id, WaypointType waypoint_type);
}; };
DECLARE_ENUM_AS_BIT_SET(AIWaypoint::WaypointType); DECLARE_ENUM_AS_BIT_SET(AIWaypoint::WaypointType)
#endif /* AI_WAYPOINT_HPP */ #endif /* AI_WAYPOINT_HPP */

View File

@ -30,7 +30,7 @@ enum BridgePieces {
BRIDGE_PIECE_INVALID, BRIDGE_PIECE_INVALID,
}; };
DECLARE_POSTFIX_INCREMENT(BridgePieces); DECLARE_POSTFIX_INCREMENT(BridgePieces)
enum { enum {
MAX_BRIDGES = 13 MAX_BRIDGES = 13

View File

@ -303,7 +303,7 @@ enum DoCommandFlag {
DC_ALL_TILES = 0x100, ///< allow this command also on MP_VOID tiles DC_ALL_TILES = 0x100, ///< allow this command also on MP_VOID tiles
DC_NO_MODIFY_TOWN_RATING = 0x200, ///< do not change town rating DC_NO_MODIFY_TOWN_RATING = 0x200, ///< do not change town rating
}; };
DECLARE_ENUM_AS_BIT_SET(DoCommandFlag); DECLARE_ENUM_AS_BIT_SET(DoCommandFlag)
/** /**
* Used to combine a StringID with the command. * Used to combine a StringID with the command.

View File

@ -28,7 +28,7 @@ enum GenderEthnicity {
GE_BF = 1 << ETHNICITY_BLACK | 1 << GENDER_FEMALE, ///< A female of African origin (black) GE_BF = 1 << ETHNICITY_BLACK | 1 << GENDER_FEMALE, ///< A female of African origin (black)
GE_END, GE_END,
}; };
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity); ///< See GenderRace as a bitset DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) ///< See GenderRace as a bitset
/** Bitgroups of the CompanyManagerFace variable */ /** Bitgroups of the CompanyManagerFace variable */
enum CompanyManagerFaceVariable { enum CompanyManagerFaceVariable {
@ -52,7 +52,7 @@ enum CompanyManagerFaceVariable {
CMFV_GLASSES, CMFV_GLASSES,
CMFV_END CMFV_END
}; };
DECLARE_POSTFIX_INCREMENT(CompanyManagerFaceVariable); DECLARE_POSTFIX_INCREMENT(CompanyManagerFaceVariable)
/** Information about the valid values of CompanyManagerFace bitgroups as well as the sprites to draw */ /** Information about the valid values of CompanyManagerFace bitgroups as well as the sprites to draw */
struct CompanyManagerFaceBitsInfo { struct CompanyManagerFaceBitsInfo {

View File

@ -35,7 +35,7 @@ enum Owner {
COMPANY_NEW_COMPANY = 254, ///< The client wants a new company COMPANY_NEW_COMPANY = 254, ///< The client wants a new company
COMPANY_SPECTATOR = 255, ///< The client is spectating COMPANY_SPECTATOR = 255, ///< The client is spectating
}; };
DECLARE_POSTFIX_INCREMENT(Owner); DECLARE_POSTFIX_INCREMENT(Owner)
enum { enum {
MAX_LENGTH_PRESIDENT_NAME_BYTES = 31, ///< The maximum length of a president name in bytes including '\0' MAX_LENGTH_PRESIDENT_NAME_BYTES = 31, ///< The maximum length of a president name in bytes including '\0'

View File

@ -38,7 +38,7 @@ enum Direction {
}; };
/** Allow incrementing of Direction variables */ /** Allow incrementing of Direction variables */
DECLARE_POSTFIX_INCREMENT(Direction); DECLARE_POSTFIX_INCREMENT(Direction)
/** Define basic enum properties */ /** Define basic enum properties */
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {}; template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {};
@ -88,7 +88,7 @@ enum DiagDirection {
}; };
/** Allow incrementing of DiagDirection variables */ /** Allow incrementing of DiagDirection variables */
DECLARE_POSTFIX_INCREMENT(DiagDirection); DECLARE_POSTFIX_INCREMENT(DiagDirection)
/** Define basic enum properties */ /** Define basic enum properties */
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {}; template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {};
@ -113,7 +113,7 @@ enum DiagDirDiff {
}; };
/** Allow incrementing of DiagDirDiff variables */ /** Allow incrementing of DiagDirDiff variables */
DECLARE_POSTFIX_INCREMENT(DiagDirDiff); DECLARE_POSTFIX_INCREMENT(DiagDirDiff)
/** /**

View File

@ -40,7 +40,7 @@ public:
virtual const char *GetName() const = 0; virtual const char *GetName() const = 0;
}; };
DECLARE_POSTFIX_INCREMENT(Driver::Type); DECLARE_POSTFIX_INCREMENT(Driver::Type)
class DriverFactoryBase { class DriverFactoryBase {

View File

@ -51,7 +51,7 @@ enum ScoreID {
SCORE_MAX = 1000 ///< The max score that can be in the performance history SCORE_MAX = 1000 ///< The max score that can be in the performance history
/* the scores together of score_info is allowed to be more! */ /* the scores together of score_info is allowed to be more! */
}; };
DECLARE_POSTFIX_INCREMENT(ScoreID); DECLARE_POSTFIX_INCREMENT(ScoreID)
struct ScoreInfo { struct ScoreInfo {
byte id; ///< Unique ID of the score byte id; ///< Unique ID of the score

View File

@ -47,6 +47,6 @@ enum Searchpath {
NUM_SEARCHPATHS NUM_SEARCHPATHS
}; };
DECLARE_POSTFIX_INCREMENT(Searchpath); DECLARE_POSTFIX_INCREMENT(Searchpath)
#endif /* FILEIO_TYPE_H */ #endif /* FILEIO_TYPE_H */

View File

@ -102,7 +102,7 @@ enum StringAlignment {
SA_FORCE = 4, ///< Force the alignment, i.e. don't swap for RTL languages. SA_FORCE = 4, ///< Force the alignment, i.e. don't swap for RTL languages.
SA_STRIP = 8, ///< Strip the SETX/SETXY commands from the string SA_STRIP = 8, ///< Strip the SETX/SETXY commands from the string
}; };
DECLARE_ENUM_AS_BIT_SET(StringAlignment); DECLARE_ENUM_AS_BIT_SET(StringAlignment)
int DrawString(int left, int right, int top, const char *str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false); int DrawString(int left, int right, int top, const char *str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
int DrawString(int left, int right, int top, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false); int DrawString(int left, int right, int top, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);

View File

@ -165,7 +165,7 @@ enum FontSize {
FS_BEGIN = FS_NORMAL, ///< First font. FS_BEGIN = FS_NORMAL, ///< First font.
}; };
DECLARE_POSTFIX_INCREMENT(FontSize); DECLARE_POSTFIX_INCREMENT(FontSize)
/** /**
* Used to only draw a part of the sprite. * Used to only draw a part of the sprite.
@ -221,7 +221,7 @@ enum TextColour {
IS_PALETTE_COLOUR = 0x100, ///< colour value is already a real palette colour index, not an index of a StringColour IS_PALETTE_COLOUR = 0x100, ///< colour value is already a real palette colour index, not an index of a StringColour
}; };
DECLARE_ENUM_AS_BIT_SET(TextColour); DECLARE_ENUM_AS_BIT_SET(TextColour)
/** Defines a few values that are related to animations using palette changes */ /** Defines a few values that are related to animations using palette changes */
enum PaletteAnimationSizes { enum PaletteAnimationSizes {

View File

@ -81,14 +81,14 @@ enum IndustryBehaviour {
INDUSTRYBEH_NOBUILT_MAPCREATION = 1 << 16, ///< Do not force one instance of this type to appear on map generation INDUSTRYBEH_NOBUILT_MAPCREATION = 1 << 16, ///< Do not force one instance of this type to appear on map generation
INDUSTRYBEH_CANCLOSE_LASTINSTANCE = 1 << 17, ///< Allow closing down the last instance of this type INDUSTRYBEH_CANCLOSE_LASTINSTANCE = 1 << 17, ///< Allow closing down the last instance of this type
}; };
DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour); DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour)
/** Flags for miscellaneous industry tile specialities */ /** Flags for miscellaneous industry tile specialities */
enum IndustryTileSpecialFlags { enum IndustryTileSpecialFlags {
INDTILE_SPECIAL_NONE = 0, INDTILE_SPECIAL_NONE = 0,
INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS = 1 << 0, ///< Callback 0x26 needs random bits INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS = 1 << 0, ///< Callback 0x26 needs random bits
}; };
DECLARE_ENUM_AS_BIT_SET(IndustryTileSpecialFlags); DECLARE_ENUM_AS_BIT_SET(IndustryTileSpecialFlags)
struct IndustryTileTable { struct IndustryTileTable {
TileIndexDiffC ti; TileIndexDiffC ti;

View File

@ -54,7 +54,7 @@ enum LiveryScheme {
LS_END LS_END
}; };
DECLARE_POSTFIX_INCREMENT(LiveryScheme); DECLARE_POSTFIX_INCREMENT(LiveryScheme)
/* List of different livery classes, used only by the livery GUI. */ /* List of different livery classes, used only by the livery GUI. */
enum LiveryClass { enum LiveryClass {

View File

@ -40,7 +40,7 @@
#endif /* DEBUG_DUMP_COMMANDS */ #endif /* DEBUG_DUMP_COMMANDS */
#include "table/strings.h" #include "table/strings.h"
DECLARE_POSTFIX_INCREMENT(ClientID); DECLARE_POSTFIX_INCREMENT(ClientID)
assert_compile(NetworkClientInfoPool::MAX_SIZE == NetworkClientSocketPool::MAX_SIZE); assert_compile(NetworkClientInfoPool::MAX_SIZE == NetworkClientSocketPool::MAX_SIZE);

View File

@ -29,7 +29,7 @@ enum GrfLoadingStage {
GLS_END, GLS_END,
}; };
DECLARE_POSTFIX_INCREMENT(GrfLoadingStage); DECLARE_POSTFIX_INCREMENT(GrfLoadingStage)
enum GrfMiscBit { enum GrfMiscBit {
GMB_DESERT_TREES_FIELDS = 0, // Unsupported. GMB_DESERT_TREES_FIELDS = 0, // Unsupported.

View File

@ -36,7 +36,7 @@ enum AirportClassID {
}; };
/** Allow incrementing of AirportClassID variables */ /** Allow incrementing of AirportClassID variables */
DECLARE_POSTFIX_INCREMENT(AirportClassID); DECLARE_POSTFIX_INCREMENT(AirportClassID)
/** TTDP airport types. Used to map our types to TTDPatch's */ /** TTDP airport types. Used to map our types to TTDPatch's */
enum TTDPAirportType { enum TTDPAirportType {

View File

@ -29,7 +29,7 @@ enum StationClassID {
typedef SimpleTinyEnumT<StationClassID, byte> StationClassIDByte; typedef SimpleTinyEnumT<StationClassID, byte> StationClassIDByte;
/** Allow incrementing of StationClassID variables */ /** Allow incrementing of StationClassID variables */
DECLARE_POSTFIX_INCREMENT(StationClassID); DECLARE_POSTFIX_INCREMENT(StationClassID)
enum StationSpecFlags { enum StationSpecFlags {
SSF_SEPARATE_GROUND, ///< Use different sprite set for ground sprites. SSF_SEPARATE_GROUND, ///< Use different sprite set for ground sprites.

View File

@ -97,7 +97,7 @@ enum NewsFlag {
NF_NO_TRANSPARENT = 1 << 1, ///< Bit value for disabling transparency. NF_NO_TRANSPARENT = 1 << 1, ///< Bit value for disabling transparency.
NF_SHADE = 1 << 2, ///< Bit value for enabling shading. NF_SHADE = 1 << 2, ///< Bit value for enabling shading.
}; };
DECLARE_ENUM_AS_BIT_SET(NewsFlag); DECLARE_ENUM_AS_BIT_SET(NewsFlag)
/** /**

View File

@ -61,7 +61,7 @@ enum PauseMode {
/* Pause mode bits when paused for network reasons */ /* Pause mode bits when paused for network reasons */
PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN, PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN,
}; };
DECLARE_ENUM_AS_BIT_SET(PauseMode); DECLARE_ENUM_AS_BIT_SET(PauseMode)
typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte; typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte;
/** The current pause mode */ /** The current pause mode */

View File

@ -103,7 +103,7 @@ enum OrderDepotActionFlags {
ODATFB_HALT = 1 << 0, ///< Service the vehicle and then halt it. ODATFB_HALT = 1 << 0, ///< Service the vehicle and then halt it.
ODATFB_NEAREST_DEPOT = 1 << 1, ///< Send the vehicle to the nearest depot. ODATFB_NEAREST_DEPOT = 1 << 1, ///< Send the vehicle to the nearest depot.
}; };
DECLARE_ENUM_AS_BIT_SET(OrderDepotActionFlags); DECLARE_ENUM_AS_BIT_SET(OrderDepotActionFlags)
/** /**
* Variables (of a vehicle) to 'cause' skipping on. * Variables (of a vehicle) to 'cause' skipping on.

View File

@ -115,7 +115,7 @@ enum EndSegmentReasonBits {
ESRB_ABORT_PF_MASK = ESRB_DEAD_END | ESRB_PATH_TOO_LONG | ESRB_INFINITE_LOOP | ESRB_FIRST_TWO_WAY_RED, ESRB_ABORT_PF_MASK = ESRB_DEAD_END | ESRB_PATH_TOO_LONG | ESRB_INFINITE_LOOP | ESRB_FIRST_TWO_WAY_RED,
}; };
DECLARE_ENUM_AS_BIT_SET(EndSegmentReasonBits); DECLARE_ENUM_AS_BIT_SET(EndSegmentReasonBits)
inline CStrA ValueStr(EndSegmentReasonBits bits) inline CStrA ValueStr(EndSegmentReasonBits bits)
{ {

View File

@ -27,7 +27,7 @@ enum RailTypeFlags {
RTFB_NONE = 0, ///< All flags cleared. RTFB_NONE = 0, ///< All flags cleared.
RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary. RTFB_CATENARY = 1 << RTF_CATENARY, ///< Value for drawing a catenary.
}; };
DECLARE_ENUM_AS_BIT_SET(RailTypeFlags); DECLARE_ENUM_AS_BIT_SET(RailTypeFlags)
struct SpriteGroup; struct SpriteGroup;

View File

@ -41,7 +41,7 @@ enum RailType {
}; };
/** Allow incrementing of Track variables */ /** Allow incrementing of Track variables */
DECLARE_POSTFIX_INCREMENT(RailType); DECLARE_POSTFIX_INCREMENT(RailType)
/** Define basic enum properties */ /** Define basic enum properties */
template <> struct EnumPropsT<RailType> : MakeEnumPropsT<RailType, byte, RAILTYPE_BEGIN, RAILTYPE_END, INVALID_RAILTYPE> {}; template <> struct EnumPropsT<RailType> : MakeEnumPropsT<RailType, byte, RAILTYPE_BEGIN, RAILTYPE_END, INVALID_RAILTYPE> {};
typedef TinyEnumT<RailType> RailTypeByte; typedef TinyEnumT<RailType> RailTypeByte;
@ -57,6 +57,6 @@ enum RailTypes {
RAILTYPES_MAGLEV = 1 << RAILTYPE_MAGLEV, ///< Ever fast maglev RAILTYPES_MAGLEV = 1 << RAILTYPE_MAGLEV, ///< Ever fast maglev
INVALID_RAILTYPES = UINT_MAX ///< Invalid railtypes INVALID_RAILTYPES = UINT_MAX ///< Invalid railtypes
}; };
DECLARE_ENUM_AS_BIT_SET(RailTypes); DECLARE_ENUM_AS_BIT_SET(RailTypes)
#endif /* RAIL_TYPE_H */ #endif /* RAIL_TYPE_H */

View File

@ -51,7 +51,7 @@ enum RoadFlags {
RF_START_HALFROAD_X = 0x08, // The start tile in X-dir should have only a half road RF_START_HALFROAD_X = 0x08, // The start tile in X-dir should have only a half road
RF_END_HALFROAD_X = 0x10, // The end tile in X-dir should have only a half road RF_END_HALFROAD_X = 0x10, // The end tile in X-dir should have only a half road
}; };
DECLARE_ENUM_AS_BIT_SET(RoadFlags); DECLARE_ENUM_AS_BIT_SET(RoadFlags)
static RoadFlags _place_road_flag; static RoadFlags _place_road_flag;

View File

@ -167,7 +167,7 @@ enum DisallowedRoadDirections {
DRD_BOTH, ///< All directions are disallowed DRD_BOTH, ///< All directions are disallowed
DRD_END DRD_END
}; };
DECLARE_ENUM_AS_BIT_SET(DisallowedRoadDirections); DECLARE_ENUM_AS_BIT_SET(DisallowedRoadDirections)
/** /**
* Gets the disallowed directions * Gets the disallowed directions

View File

@ -26,7 +26,7 @@ enum RoadType {
ROADTYPE_END, ///< Used for iterations ROADTYPE_END, ///< Used for iterations
INVALID_ROADTYPE = 0xFF ///< flag for invalid roadtype INVALID_ROADTYPE = 0xFF ///< flag for invalid roadtype
}; };
DECLARE_POSTFIX_INCREMENT(RoadType); DECLARE_POSTFIX_INCREMENT(RoadType)
/** /**
* The different roadtypes we support, but then a bitmask of them * The different roadtypes we support, but then a bitmask of them
@ -40,7 +40,7 @@ enum RoadTypes {
ROADTYPES_END, ///< Used for iterations? ROADTYPES_END, ///< Used for iterations?
INVALID_ROADTYPES = 0xFF ///< Invalid roadtypes INVALID_ROADTYPES = 0xFF ///< Invalid roadtypes
}; };
DECLARE_ENUM_AS_BIT_SET(RoadTypes); DECLARE_ENUM_AS_BIT_SET(RoadTypes)
typedef SimpleTinyEnumT<RoadTypes, byte> RoadTypesByte; typedef SimpleTinyEnumT<RoadTypes, byte> RoadTypesByte;
@ -66,6 +66,6 @@ enum RoadBits {
ROAD_ALL = ROAD_X | ROAD_Y ///< Full 4-way crossing ROAD_ALL = ROAD_X | ROAD_Y ///< Full 4-way crossing
}; };
DECLARE_ENUM_AS_BIT_SET(RoadBits); DECLARE_ENUM_AS_BIT_SET(RoadBits)
#endif /* ROAD_TYPE_H */ #endif /* ROAD_TYPE_H */

View File

@ -84,7 +84,7 @@ enum OldChunkType {
OC_END = 0 ///< End of the whole chunk, all 32 bits set to zero OC_END = 0 ///< End of the whole chunk, all 32 bits set to zero
}; };
DECLARE_ENUM_AS_BIT_SET(OldChunkType); DECLARE_ENUM_AS_BIT_SET(OldChunkType)
typedef bool OldChunkProc(LoadgameState *ls, int num); typedef bool OldChunkProc(LoadgameState *ls, int num);

View File

@ -49,7 +49,7 @@ enum SettingGuiFlagLong {
SGF_SCENEDIT_TOO = 1 << 7, ///< this setting can be changed in the scenario editor (only makes sense when SGF_NEWGAME_ONLY is set) SGF_SCENEDIT_TOO = 1 << 7, ///< this setting can be changed in the scenario editor (only makes sense when SGF_NEWGAME_ONLY is set)
SGF_PER_COMPANY = 1 << 8, ///< this setting can be different for each company (saved in company struct) SGF_PER_COMPANY = 1 << 8, ///< this setting can be different for each company (saved in company struct)
}; };
DECLARE_ENUM_AS_BIT_SET(SettingGuiFlagLong); DECLARE_ENUM_AS_BIT_SET(SettingGuiFlagLong)
typedef SimpleTinyEnumT<SettingGuiFlagLong, uint16> SettingGuiFlag; typedef SimpleTinyEnumT<SettingGuiFlagLong, uint16> SettingGuiFlag;

View File

@ -29,7 +29,7 @@ enum SortListFlags {
VL_FILTER = 1 << 4, ///< filter disabled/enabled VL_FILTER = 1 << 4, ///< filter disabled/enabled
VL_END = 1 << 5, VL_END = 1 << 5,
}; };
DECLARE_ENUM_AS_BIT_SET(SortListFlags); DECLARE_ENUM_AS_BIT_SET(SortListFlags)
/** Data structure describing how to show the list (what sort direction and criterium). */ /** Data structure describing how to show the list (what sort direction and criterium). */
struct Listing { struct Listing {

View File

@ -56,7 +56,7 @@ enum StationFacility {
FACIL_DOCK = 1 << 4, ///< Station with a dock FACIL_DOCK = 1 << 4, ///< Station with a dock
FACIL_WAYPOINT = 1 << 7, ///< Station is a waypoint FACIL_WAYPOINT = 1 << 7, ///< Station is a waypoint
}; };
DECLARE_ENUM_AS_BIT_SET(StationFacility); DECLARE_ENUM_AS_BIT_SET(StationFacility)
typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte; typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte;
/** The vehicles that may have visited a station */ /** The vehicles that may have visited a station */
@ -70,7 +70,7 @@ enum StationHadVehicleOfType {
HVOT_WAYPOINT = 1 << 6, ///< Station is a waypoint (NewGRF only!) HVOT_WAYPOINT = 1 << 6, ///< Station is a waypoint (NewGRF only!)
}; };
DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType); DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType)
typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte; typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte;
/** The different catchment areas used */ /** The different catchment areas used */

View File

@ -21,7 +21,7 @@ enum PartOfSubsidy {
}; };
typedef SimpleTinyEnumT<PartOfSubsidy, byte> PartOfSubsidyByte; typedef SimpleTinyEnumT<PartOfSubsidy, byte> PartOfSubsidyByte;
DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy); DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
typedef uint16 SubsidyID; ///< ID of a subsidy typedef uint16 SubsidyID; ///< ID of a subsidy
struct Subsidy; struct Subsidy;

View File

@ -17,7 +17,7 @@ enum CmdFlags {
C_CASE = 0x2, ///< These commands support cases C_CASE = 0x2, ///< These commands support cases
C_GENDER = 0x4, ///< These commands support genders C_GENDER = 0x4, ///< These commands support genders
}; };
DECLARE_ENUM_AS_BIT_SET(CmdFlags); DECLARE_ENUM_AS_BIT_SET(CmdFlags)
typedef void (*ParseCmdProc)(char *buf, int value); typedef void (*ParseCmdProc)(char *buf, int value);

View File

@ -1738,7 +1738,7 @@ enum CzechAllow {
CZA_ALL = ~0 CZA_ALL = ~0
}; };
DECLARE_ENUM_AS_BIT_SET(CzechAllow); DECLARE_ENUM_AS_BIT_SET(CzechAllow)
/* All these flags must be satisfied (in the stem->others direction): */ /* All these flags must be satisfied (in the stem->others direction): */
enum CzechChoose { enum CzechChoose {
@ -1749,7 +1749,7 @@ enum CzechChoose {
CZC_ANY = ~0 CZC_ANY = ~0
}; };
DECLARE_ENUM_AS_BIT_SET(CzechChoose); DECLARE_ENUM_AS_BIT_SET(CzechChoose)
struct CzechNameSubst { struct CzechNameSubst {
CzechGender gender; CzechGender gender;

View File

@ -38,7 +38,7 @@ enum VehicleEnterTileStatus {
VETSB_ENTERED_WORMHOLE = 1 << VETS_ENTERED_WORMHOLE, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel) VETSB_ENTERED_WORMHOLE = 1 << VETS_ENTERED_WORMHOLE, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel)
VETSB_CANNOT_ENTER = 1 << VETS_CANNOT_ENTER, ///< The vehicle cannot enter the tile VETSB_CANNOT_ENTER = 1 << VETS_CANNOT_ENTER, ///< The vehicle cannot enter the tile
}; };
DECLARE_ENUM_AS_BIT_SET(VehicleEnterTileStatus); DECLARE_ENUM_AS_BIT_SET(VehicleEnterTileStatus)
/** Tile information, used while rendering the tile */ /** Tile information, used while rendering the tile */
struct TileInfo { struct TileInfo {

View File

@ -39,7 +39,7 @@ enum HighLightStyle {
HT_DIR_END, ///< end marker HT_DIR_END, ///< end marker
HT_DIR_MASK = 0x7 ///< masks the drag-direction HT_DIR_MASK = 0x7 ///< masks the drag-direction
}; };
DECLARE_ENUM_AS_BIT_SET(HighLightStyle); DECLARE_ENUM_AS_BIT_SET(HighLightStyle)
struct TileHighlightData { struct TileHighlightData {

View File

@ -223,7 +223,7 @@ enum TownActions {
TACT_FUNDS = TACT_BUY_RIGHTS | TACT_BRIBE, ///< All possible funding actions. TACT_FUNDS = TACT_BUY_RIGHTS | TACT_BRIBE, ///< All possible funding actions.
TACT_ALL = TACT_ADVERTISE | TACT_CONSTRUCTION | TACT_FUNDS, ///< All possible actions. TACT_ALL = TACT_ADVERTISE | TACT_CONSTRUCTION | TACT_FUNDS, ///< All possible actions.
}; };
DECLARE_ENUM_AS_BIT_SET(TownActions); DECLARE_ENUM_AS_BIT_SET(TownActions)
extern const byte _town_action_costs[TACT_COUNT]; extern const byte _town_action_costs[TACT_COUNT];
extern TownID _new_town_id; extern TownID _new_town_id;

View File

@ -31,7 +31,7 @@ enum Track {
}; };
/** Allow incrementing of Track variables */ /** Allow incrementing of Track variables */
DECLARE_POSTFIX_INCREMENT(Track); DECLARE_POSTFIX_INCREMENT(Track)
/** Define basic enum properties */ /** Define basic enum properties */
template <> struct EnumPropsT<Track> : MakeEnumPropsT<Track, byte, TRACK_BEGIN, TRACK_END, INVALID_TRACK> {}; template <> struct EnumPropsT<Track> : MakeEnumPropsT<Track, byte, TRACK_BEGIN, TRACK_END, INVALID_TRACK> {};
typedef TinyEnumT<Track> TrackByte; typedef TinyEnumT<Track> TrackByte;
@ -59,7 +59,7 @@ enum TrackBits {
TRACK_BIT_DEPOT = 0x80U, ///< Bitflag for a depot TRACK_BIT_DEPOT = 0x80U, ///< Bitflag for a depot
INVALID_TRACK_BIT = 0xFF ///< Flag for an invalid trackbits value INVALID_TRACK_BIT = 0xFF ///< Flag for an invalid trackbits value
}; };
DECLARE_ENUM_AS_BIT_SET(TrackBits); DECLARE_ENUM_AS_BIT_SET(TrackBits)
typedef SimpleTinyEnumT<TrackBits, byte> TrackBitsByte; typedef SimpleTinyEnumT<TrackBits, byte> TrackBitsByte;
/** /**
@ -121,7 +121,7 @@ enum TrackdirBits {
TRACKDIR_BIT_MASK = 0x3F3F, ///< Bitmask for bit-operations TRACKDIR_BIT_MASK = 0x3F3F, ///< Bitmask for bit-operations
INVALID_TRACKDIR_BIT = 0xFFFF, ///< Flag for an invalid trackdirbit value INVALID_TRACKDIR_BIT = 0xFFFF, ///< Flag for an invalid trackdirbit value
}; };
DECLARE_ENUM_AS_BIT_SET(TrackdirBits); DECLARE_ENUM_AS_BIT_SET(TrackdirBits)
typedef SimpleTinyEnumT<TrackdirBits, uint16> TrackdirBitsShort; typedef SimpleTinyEnumT<TrackdirBits, uint16> TrackdirBitsShort;
typedef uint32 TrackStatus; typedef uint32 TrackStatus;

View File

@ -27,7 +27,7 @@ enum VehicleType {
VEH_END, VEH_END,
VEH_INVALID = 0xFF, ///< Non-existing type of vehicle. VEH_INVALID = 0xFF, ///< Non-existing type of vehicle.
}; };
DECLARE_POSTFIX_INCREMENT(VehicleType); DECLARE_POSTFIX_INCREMENT(VehicleType)
/** It needs to be 8bits, because we save and load it as such */ /** It needs to be 8bits, because we save and load it as such */
typedef SimpleTinyEnumT<VehicleType, byte> VehicleTypeByte; typedef SimpleTinyEnumT<VehicleType, byte> VehicleTypeByte;

View File

@ -82,7 +82,7 @@ enum ViewportPlaceMethod {
VPM_RAILDIRS = 0x40, ///< all rail directions VPM_RAILDIRS = 0x40, ///< all rail directions
VPM_SIGNALDIRS = 0x80, ///< similiar to VMP_RAILDIRS, but with different cursor VPM_SIGNALDIRS = 0x80, ///< similiar to VMP_RAILDIRS, but with different cursor
}; };
DECLARE_ENUM_AS_BIT_SET(ViewportPlaceMethod); DECLARE_ENUM_AS_BIT_SET(ViewportPlaceMethod)
/** Drag and drop selection process, or, what to do with an area of land when /** Drag and drop selection process, or, what to do with an area of land when
* you've selected it. */ * you've selected it. */

View File

@ -235,7 +235,7 @@ enum NWidgetDisplay {
ND_SHADE_DIMMED = 1 << NDB_SHADE_DIMMED, ///< Bit value of the 'dimmed colours' flag. ND_SHADE_DIMMED = 1 << NDB_SHADE_DIMMED, ///< Bit value of the 'dimmed colours' flag.
ND_DROPDOWN_ACTIVE = 1 << NDB_DROPDOWN_ACTIVE, ///< Bit value of the 'dropdown active' flag. ND_DROPDOWN_ACTIVE = 1 << NDB_DROPDOWN_ACTIVE, ///< Bit value of the 'dropdown active' flag.
}; };
DECLARE_ENUM_AS_BIT_SET(NWidgetDisplay); DECLARE_ENUM_AS_BIT_SET(NWidgetDisplay)
/** Base class for a 'real' widget. /** Base class for a 'real' widget.
* @ingroup NestedWidgets */ * @ingroup NestedWidgets */
@ -358,7 +358,7 @@ enum NWidContainerFlags {
NC_NONE = 0, ///< All flags cleared. NC_NONE = 0, ///< All flags cleared.
NC_EQUALSIZE = 1 << NCB_EQUALSIZE, ///< Value of the #NCB_EQUALSIZE flag. NC_EQUALSIZE = 1 << NCB_EQUALSIZE, ///< Value of the #NCB_EQUALSIZE flag.
}; };
DECLARE_ENUM_AS_BIT_SET(NWidContainerFlags); DECLARE_ENUM_AS_BIT_SET(NWidContainerFlags)
/** Container with pre/inter/post child space. */ /** Container with pre/inter/post child space. */
class NWidgetPIPContainer : public NWidgetContainer { class NWidgetPIPContainer : public NWidgetContainer {

View File

@ -30,7 +30,7 @@ enum FrameFlags {
FR_DARKENED = 1 << 6, ///< If set the background is darker, allows for lowered frames with normal background colour when used with FR_LOWERED (ie. dropdown boxes) FR_DARKENED = 1 << 6, ///< If set the background is darker, allows for lowered frames with normal background colour when used with FR_LOWERED (ie. dropdown boxes)
}; };
DECLARE_ENUM_AS_BIT_SET(FrameFlags); DECLARE_ENUM_AS_BIT_SET(FrameFlags)
/** Distances used in drawing widgets. */ /** Distances used in drawing widgets. */
enum WidgetDrawDistances { enum WidgetDrawDistances {