# HG changeset patch # User frosch # Date 2012-05-25 20:52:11 # Node ID 2ad849e759c9f723c037a53222dab54609c48359 # Parent 13fe47dcdbda1f0601b1071fdf95c88c4cc3fc1a (svn r24275) -Codechange: Make SmallVector::FindIndex() const. diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -148,10 +148,10 @@ public: * @param item Item to search for * @return The position of the item, or -1 when not present */ - inline int FindIndex(const T &item) + inline int FindIndex(const T &item) const { int index = 0; - T *pos = this->Begin(); + const T *pos = this->Begin(); const T *end = this->End(); while (pos != end && *pos != item) { pos++;