summaryrefslogtreecommitdiff
path: root/src/settings_internal.h
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-04-22 11:10:44 +0100
committerPeterN <peter@fuzzle.org>2019-04-29 17:40:22 +0100
commit644f4c3547a312d53c1014639df3dc2f55ab4de8 (patch)
treea6f054f94bd4966d439ed976008c0c5a3e6fd612 /src/settings_internal.h
parent0a53ee8cfe3d02aa1e7abb6c8cf67ef1d7e5ab58 (diff)
downloadopenttd-644f4c3547a312d53c1014639df3dc2f55ab4de8.tar.xz
Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly
Diffstat (limited to 'src/settings_internal.h')
-rw-r--r--src/settings_internal.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 028e977e4..0f1d3c192 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -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.