summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-06-16 23:21:21 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-17 16:18:30 +0200
commit281a65b3e17310d07458652a3f6cba55aff59dc0 (patch)
treee3f06df00a9f8fc074f863b230980f2a11b066e4 /src/saveload
parent357af686dc5e0a0085da5c42639abe83caebe6c3 (diff)
downloadopenttd-281a65b3e17310d07458652a3f6cba55aff59dc0.tar.xz
Cleanup: simplify some boolean expressions
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index dfd687f35..8456da415 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -956,9 +956,7 @@ static inline bool IsSavegameVersionUntil(SaveLoadVersion major)
static inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLoadVersion version_to)
{
extern const SaveLoadVersion SAVEGAME_VERSION;
- if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION >= version_to) return false;
-
- return true;
+ return version_from <= SAVEGAME_VERSION && SAVEGAME_VERSION < version_to;
}
/**