diff --git a/include/Nazara/Core/SparsePtr.hpp b/include/Nazara/Core/SparsePtr.hpp index 8d104827c..b077b6d56 100644 --- a/include/Nazara/Core/SparsePtr.hpp +++ b/include/Nazara/Core/SparsePtr.hpp @@ -46,7 +46,9 @@ class NzSparsePtr T& operator[](int index) const; NzSparsePtr operator+(int count) const; + NzSparsePtr operator+(unsigned int count) const; NzSparsePtr operator-(int count) const; + NzSparsePtr operator-(unsigned int count) const; std::ptrdiff_t operator-(const NzSparsePtr& ptr) const; NzSparsePtr& operator+=(int count); diff --git a/include/Nazara/Core/SparsePtr.inl b/include/Nazara/Core/SparsePtr.inl index eb6c988ae..188996d4b 100644 --- a/include/Nazara/Core/SparsePtr.inl +++ b/include/Nazara/Core/SparsePtr.inl @@ -127,12 +127,24 @@ NzSparsePtr NzSparsePtr::operator+(int count) const return NzSparsePtr(m_ptr + count*m_stride, m_stride); } +template +NzSparsePtr NzSparsePtr::operator+(unsigned int count) const +{ + return NzSparsePtr(m_ptr + count*m_stride, m_stride); +} + template NzSparsePtr NzSparsePtr::operator-(int count) const { return NzSparsePtr(m_ptr - count*m_stride, m_stride); } +template +NzSparsePtr NzSparsePtr::operator-(unsigned int count) const +{ + return NzSparsePtr(m_ptr - count*m_stride, m_stride); +} + template std::ptrdiff_t NzSparsePtr::operator-(const NzSparsePtr& ptr) const {