summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-06-16 22:29:57 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-17 16:18:30 +0200
commit357af686dc5e0a0085da5c42639abe83caebe6c3 (patch)
tree5a03eeaaa6abcd58809caae08e14deadf64b561a
parentf904aef176b7bde38f27cc9b4f23c55dc13d2ce5 (diff)
downloadopenttd-357af686dc5e0a0085da5c42639abe83caebe6c3.tar.xz
Cleanup: use true/false instead of 1/0 where applicable
-rw-r--r--src/saveload/afterload.cpp2
-rw-r--r--src/saveload/ai_sl.cpp2
-rw-r--r--src/video/opengl.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index b67d57a65..83f3c6fc6 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -733,7 +733,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(SLV_6, 1)) _settings_game.pf.forbid_90_deg = false;
if (IsSavegameVersionBefore(SLV_21)) _settings_game.vehicle.train_acceleration_model = 0;
if (IsSavegameVersionBefore(SLV_90)) _settings_game.vehicle.plane_speed = 4;
- if (IsSavegameVersionBefore(SLV_95)) _settings_game.vehicle.dynamic_engines = 0;
+ if (IsSavegameVersionBefore(SLV_95)) _settings_game.vehicle.dynamic_engines = false;
if (IsSavegameVersionBefore(SLV_96)) _settings_game.economy.station_noise_level = false;
if (IsSavegameVersionBefore(SLV_133)) {
_settings_game.vehicle.train_slope_steepness = 3;
diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp
index c821dfe59..49221ef30 100644
--- a/src/saveload/ai_sl.cpp
+++ b/src/saveload/ai_sl.cpp
@@ -65,7 +65,7 @@ static void Load_AIPL()
while ((index = (CompanyID)SlIterateArray()) != (CompanyID)-1) {
if (index >= MAX_COMPANIES) SlErrorCorrupt("Too many AI configs");
- _ai_saveload_is_random = 0;
+ _ai_saveload_is_random = false;
_ai_saveload_version = -1;
SlObject(nullptr, _ai_company);
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp
index 2014d1cf9..6e37db03b 100644
--- a/src/video/opengl.cpp
+++ b/src/video/opengl.cpp
@@ -146,7 +146,7 @@ GetOGLProcAddressProc GetOGLProcAddress;
*/
const char *FindStringInExtensionList(const char *string, const char *substring)
{
- while (1) {
+ while (true) {
/* Is the extension string present at all? */
const char *pos = strstr(string, substring);
if (pos == nullptr) break;