summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-03 21:01:00 +0200
committerPatric Stout <github@truebrain.nl>2021-06-06 21:45:01 +0200
commit7572603c9d97215afe62cd79e25048237a637616 (patch)
tree9915b3b0034d8b7088ff6c2d6bfa07265c6e63a3
parentd835a42c05f6a48f120b47e94a042848a20edd5c (diff)
downloadopenttd-7572603c9d97215afe62cd79e25048237a637616.tar.xz
Codechange: remove the unused SLF_HEX flag
-rw-r--r--src/saveload/saveload.h2
-rw-r--r--src/settings.cpp4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 41880952e..ce597affc 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -490,8 +490,6 @@ enum VarTypes {
SLF_NO_NETWORK_SYNC = 1 << 10, ///< do not synchronize over network (but it is saved if SLF_NOT_IN_SAVE is not set)
SLF_ALLOW_CONTROL = 1 << 11, ///< allow control codes in the strings
SLF_ALLOW_NEWLINE = 1 << 12, ///< allow new lines in the strings
- SLF_HEX = 1 << 13, ///< print numbers as hex in the config file (only useful for unsigned)
- /* 2 more possible flags */
};
typedef uint32 VarType;
diff --git a/src/settings.cpp b/src/settings.cpp
index 50dc38790..60ae20d82 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -274,8 +274,6 @@ void ListSettingDesc::FormatValue(char *buf, const char *last, const void *objec
}
if (IsSignedVarMemType(this->save.conv)) {
buf += seprintf(buf, last, (i == 0) ? "%d" : ",%d", v);
- } else if (this->save.conv & SLF_HEX) {
- buf += seprintf(buf, last, (i == 0) ? "0x%X" : ",0x%X", v);
} else {
buf += seprintf(buf, last, (i == 0) ? "%u" : ",%u", v);
}
@@ -621,7 +619,7 @@ static void IniSaveSettings(IniFile *ini, const SettingTable &settings_table, co
void IntSettingDesc::FormatValue(char *buf, const char *last, const void *object) const
{
uint32 i = (uint32)this->Read(object);
- seprintf(buf, last, IsSignedVarMemType(this->save.conv) ? "%d" : (this->save.conv & SLF_HEX) ? "%X" : "%u", i);
+ seprintf(buf, last, IsSignedVarMemType(this->save.conv) ? "%d" : "%u", i);
}
void BoolSettingDesc::FormatValue(char *buf, const char *last, const void *object) const