diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -716,7 +716,7 @@ struct SaveLoadCompat { * @param type VarType holding information about the variable-type * @return the SLE_VAR_* part of a variable-type description */ -static inline constexpr VarType GetVarMemType(VarType type) +inline constexpr VarType GetVarMemType(VarType type) { return GB(type, 4, 4) << 4; } @@ -727,7 +727,7 @@ static inline constexpr VarType GetVarMe * @param type VarType holding information about the file-type * @return the SLE_FILE_* part of a variable-type description */ -static inline constexpr VarType GetVarFileType(VarType type) +inline constexpr VarType GetVarFileType(VarType type) { return GB(type, 0, 4); } @@ -737,7 +737,7 @@ static inline constexpr VarType GetVarFi * @param conv the type to check * @return True if it's a numeric type. */ -static inline constexpr bool IsNumericType(VarType conv) +inline constexpr bool IsNumericType(VarType conv) { return GetVarMemType(conv) <= SLE_VAR_U64; } @@ -747,7 +747,7 @@ static inline constexpr bool IsNumericTy * @param type VarType to get size of. * @return size of type in bytes. */ -static inline constexpr size_t SlVarSize(VarType type) +inline constexpr size_t SlVarSize(VarType type) { switch (GetVarMemType(type)) { case SLE_VAR_BL: return sizeof(bool); @@ -775,7 +775,7 @@ static inline constexpr size_t SlVarSize * @param size Actual size of variable. * @return true iff the sizes match. */ -static inline constexpr bool SlCheckVarSize(SaveLoadType cmd, VarType type, size_t length, size_t size) +inline constexpr bool SlCheckVarSize(SaveLoadType cmd, VarType type, size_t length, size_t size) { switch (cmd) { case SL_VAR: return SlVarSize(type) == size; @@ -1191,7 +1191,7 @@ static inline constexpr bool SlCheckVarS * @param minor Minor number of the version to check against. If \a minor is 0 or not specified, only the major number is checked. * @return Savegame version is earlier than the specified version. */ -static inline bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor = 0) +inline bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor = 0) { extern SaveLoadVersion _sl_version; extern byte _sl_minor_version; @@ -1205,7 +1205,7 @@ static inline bool IsSavegameVersionBefo * @param major Major number of the version to check against. * @return Savegame version is at most the specified version. */ -static inline bool IsSavegameVersionBeforeOrAt(SaveLoadVersion major) +inline bool IsSavegameVersionBeforeOrAt(SaveLoadVersion major) { extern SaveLoadVersion _sl_version; return _sl_version <= major; @@ -1218,7 +1218,7 @@ static inline bool IsSavegameVersionBefo * @param version_to Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound. * @return Active savegame version falls within the given range. */ -static inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLoadVersion version_to) +inline bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLoadVersion version_to) { extern const SaveLoadVersion SAVEGAME_VERSION; return version_from <= SAVEGAME_VERSION && SAVEGAME_VERSION < version_to; @@ -1229,7 +1229,7 @@ static inline bool SlIsObjectCurrentlyVa * everything else has a callback function that returns the address based * on the saveload data and the current object for non-globals. */ -static inline void *GetVariableAddress(const void *object, const SaveLoad &sld) +inline void *GetVariableAddress(const void *object, const SaveLoad &sld) { /* Entry is a null-variable, mostly used to read old savegames etc. */ if (GetVarMemType(sld.conv) == SLE_VAR_NULL) { @@ -1273,7 +1273,7 @@ bool SaveloadCrashWithMissingNewGRFs(); * anything with them, discarding them in effect * @param length The amount of bytes that is being treated this way */ -static inline void SlSkipBytes(size_t length) +inline void SlSkipBytes(size_t length) { for (; length != 0; length--) SlReadByte(); }