summaryrefslogtreecommitdiff
path: root/src/table
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/table
parent0a53ee8cfe3d02aa1e7abb6c8cf67ef1d7e5ab58 (diff)
downloadopenttd-644f4c3547a312d53c1014639df3dc2f55ab4de8.tar.xz
Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly
Diffstat (limited to 'src/table')
-rw-r--r--src/table/currency_settings.ini2
-rw-r--r--src/table/gameopt_settings.ini2
-rw-r--r--src/table/misc_settings.ini2
-rw-r--r--src/table/settings.h.preamble10
-rw-r--r--src/table/settings.ini2
-rw-r--r--src/table/win32_settings.ini2
-rw-r--r--src/table/window_settings.ini2
7 files changed, 11 insertions, 11 deletions
diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini
index 02777d2ae..d68f4bfc2 100644
--- a/src/table/currency_settings.ini
+++ b/src/table/currency_settings.ini
@@ -18,7 +18,7 @@ SDT_END = SDT_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini
index 247bfbed2..9bacb80c7 100644
--- a/src/table/gameopt_settings.ini
+++ b/src/table/gameopt_settings.ini
@@ -50,7 +50,7 @@ SDT_END = SDT_END()
[defaults]
flags = 0
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini
index 6d974a005..a1159aee0 100644
--- a/src/table/misc_settings.ini
+++ b/src/table/misc_settings.ini
@@ -25,7 +25,7 @@ SDTG_END = SDTG_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble
index b6992764d..08380cbf1 100644
--- a/src/table/settings.h.preamble
+++ b/src/table/settings.h.preamble
@@ -57,7 +57,7 @@ static size_t ConvertLandscape(const char *value);
*/
#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, strhelp, strval, proc, load, cat)\
- {name, (const void*)(size_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, strhelp, strval, proc, load, cat}
+ {name, (const void*)(size_t)(def), cmd, guiflags, min, max, interval, many, str, strhelp, strval, proc, load, cat}
/* Macros for various objects to go in the configuration file.
* This section is for global variables */
@@ -83,9 +83,9 @@ static size_t ConvertLandscape(const char *value);
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, strhelp, strval, proc, from, to, cat)
#define SDTG_NULL(length, from, to)\
- {{"", nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_NULL(length, from, to)}
+ {{"", nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_NULL(length, from, to)}
-#define SDTG_END() {{nullptr, nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_END()}
+#define SDTG_END() {{nullptr, nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_END()}
/* Macros for various objects to go in the configuration file.
* This section is for structures where their various members are saved */
@@ -114,7 +114,7 @@ static size_t ConvertLandscape(const char *value);
SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, strhelp, strval, proc, nullptr, from, to, cat)
#define SDT_NULL(length, from, to)\
- {{"", nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_CONDNULL(length, from, to)}
+ {{"", nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_CONDNULL(length, from, to)}
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat)\
@@ -132,5 +132,5 @@ static size_t ConvertLandscape(const char *value);
#define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, cat)\
SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat)
-#define SDT_END() {{nullptr, nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_END()}
+#define SDT_END() {{nullptr, nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_END()}
diff --git a/src/table/settings.ini b/src/table/settings.ini
index 1aacb7634..5e57e5216 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -81,7 +81,7 @@ SDT_END = SDT_END()
[defaults]
flags = 0
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/win32_settings.ini b/src/table/win32_settings.ini
index 7d9821475..4b3d6f559 100644
--- a/src/table/win32_settings.ini
+++ b/src/table/win32_settings.ini
@@ -23,7 +23,7 @@ SDTG_END = SDTG_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/window_settings.ini b/src/table/window_settings.ini
index 67d1edb35..998afc8db 100644
--- a/src/table/window_settings.ini
+++ b/src/table/window_settings.ini
@@ -19,7 +19,7 @@ SDT_END = SDT_END()
[defaults]
base = WindowDesc
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT