Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
* @see VarTypes
|
||||
* @see SettingDescBase
|
||||
*/
|
||||
enum SettingDescTypeLong {
|
||||
enum SettingDescType : byte {
|
||||
/* 4 bytes allocated a maximum of 16 types for GenericType */
|
||||
SDT_BEGIN = 0,
|
||||
SDT_NUMX = 0, ///< any number-type
|
||||
@@ -32,10 +32,9 @@ enum SettingDescTypeLong {
|
||||
SDT_END,
|
||||
/* 10 more possible primitives */
|
||||
};
|
||||
typedef SimpleTinyEnumT<SettingDescTypeLong, byte> SettingDescType;
|
||||
|
||||
|
||||
enum SettingGuiFlagLong {
|
||||
enum SettingGuiFlag : uint16 {
|
||||
/* 1 byte allocated for a maximum of 8 flags
|
||||
* Flags directing saving/loading of a variable */
|
||||
SGF_NONE = 0,
|
||||
@@ -49,8 +48,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_PER_COMPANY = 1 << 8, ///< this setting can be different for each company (saved in company struct)
|
||||
};
|
||||
DECLARE_ENUM_AS_BIT_SET(SettingGuiFlagLong)
|
||||
typedef SimpleTinyEnumT<SettingGuiFlagLong, uint16> SettingGuiFlag;
|
||||
DECLARE_ENUM_AS_BIT_SET(SettingGuiFlag)
|
||||
|
||||
/**
|
||||
* A SettingCategory defines a grouping of the settings.
|
||||
|
Reference in New Issue
Block a user