diff --git a/include/utils/SortedVector.h b/include/utils/SortedVector.h index fd1cb8274..2d3e82a7c 100644 --- a/include/utils/SortedVector.h +++ b/include/utils/SortedVector.h @@ -98,8 +98,6 @@ public: inline const TYPE& itemAt(size_t index) const; //! stack-usage of the vector. returns the top of the stack (last element) const TYPE& top() const; - //! same as operator [], but allows to access the vector backward (from the end) with a negative index - const TYPE& mirrorItemAt(ssize_t index) const; /*! * modifying the array @@ -199,15 +197,6 @@ const TYPE& SortedVector::itemAt(size_t index) const { return operator[](index); } -template inline -const TYPE& SortedVector::mirrorItemAt(ssize_t index) const { - const size_t i = index>0 ? index : -index; - LOG_FATAL_IF(index>=size(), - "%s: index=%u out of range (%u)", __PRETTY_FUNCTION__, - int(index), int(size())); - return *(array() + i); -} - template inline const TYPE& SortedVector::top() const { return *(array() + size() - 1); diff --git a/include/utils/Vector.h b/include/utils/Vector.h index 506acae14..7927328e8 100644 --- a/include/utils/Vector.h +++ b/include/utils/Vector.h @@ -99,8 +99,6 @@ public: inline const TYPE& itemAt(size_t index) const; //! stack-usage of the vector. returns the top of the stack (last element) const TYPE& top() const; - //! same as operator [], but allows to access the vector backward (from the end) with a negative index - const TYPE& mirrorItemAt(ssize_t index) const; /*! * modifying the array @@ -283,15 +281,6 @@ const TYPE& Vector::itemAt(size_t index) const { return operator[](index); } -template inline -const TYPE& Vector::mirrorItemAt(ssize_t index) const { - const size_t i = index>0 ? index : -index; - LOG_FATAL_IF(index>=size(), - "%s: index=%u out of range (%u)", __PRETTY_FUNCTION__, - int(index), int(size())); - return *(array() + i); -} - template inline const TYPE& Vector::top() const { return *(array() + size() - 1);