diff options
author | glx22 <glx22@users.noreply.github.com> | 2019-03-28 00:09:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 00:09:33 +0100 |
commit | 66dd7c3879123bb99b712375b66b577f81d53a96 (patch) | |
tree | 6231635658dab5ba63b776e9350884c083617cb1 /src/core/math_func.hpp | |
parent | e817951bfdc229b404d5fec188c67f5202a0e774 (diff) | |
download | openttd-66dd7c3879123bb99b712375b66b577f81d53a96.tar.xz |
Fix: MSVC warnings (#7423)
Diffstat (limited to 'src/core/math_func.hpp')
-rw-r--r-- | src/core/math_func.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 4a19033f4..0b51d6bbf 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -247,9 +247,9 @@ static inline T Delta(const T a, const T b) * @return True if the value is in the interval, false else. */ template <typename T> -static inline bool IsInsideBS(const T x, const uint base, const uint size) +static inline bool IsInsideBS(const T x, const size_t base, const size_t size) { - return (uint)(x - base) < size; + return (size_t)(x - base) < size; } /** @@ -263,9 +263,9 @@ static inline bool IsInsideBS(const T x, const uint base, const uint size) * @see IsInsideBS() */ template <typename T> -static inline bool IsInsideMM(const T x, const uint min, const uint max) +static inline bool IsInsideMM(const T x, const size_t min, const size_t max) { - return (uint)(x - min) < (max - min); + return (size_t)(x - min) < (max - min); } /** |