Fix: MSVC warnings (#7423)

This commit is contained in:
glx22
2019-03-28 00:09:33 +01:00
committed by GitHub
parent e817951bfd
commit 66dd7c3879
39 changed files with 88 additions and 88 deletions

View File

@@ -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);
}
/**

View File

@@ -25,7 +25,7 @@
* @param desc Sort descending.
*/
template <typename T>
static inline void QSortT(T *base, uint num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
static inline void QSortT(T *base, size_t num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
{
if (num < 2) return;
@@ -49,7 +49,7 @@ static inline void QSortT(T *base, uint num, int (CDECL *comparator)(const T*, c
* @param desc Sort descending.
*/
template <typename T>
static inline void GSortT(T *base, uint num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
static inline void GSortT(T *base, size_t num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
{
if (num < 2) return;