diff --git a/include/irrArray.h b/include/irrArray.h index eef7be1..5c1c75c 100644 --- a/include/irrArray.h +++ b/include/irrArray.h @@ -241,7 +241,7 @@ public: /** \return Size of elements in the array which are actually occupied. */ u32 size() const { - return m_data.size(); + return static_cast(m_data.size()); } @@ -317,7 +317,7 @@ public: // *it = first element in [first, last) that is >= element, or last if not found. if (*it < element || element < *it) return -1; - return it - m_data.begin(); + return static_cast(it - m_data.begin()); } @@ -335,8 +335,8 @@ public: auto iters = std::equal_range(m_data.begin(), m_data.end(), element); if (iters.first == iters.second) return -1; - last = (iters.second - m_data.begin()) - 1; - return iters.first - m_data.begin(); + last = static_cast((iters.second - m_data.begin()) - 1); + return static_cast(iters.first - m_data.begin()); } @@ -351,7 +351,7 @@ public: auto it = std::find(m_data.begin(), m_data.end(), element); if (it == m_data.end()) return -1; - return it - m_data.begin(); + return static_cast(it - m_data.begin()); }