changeset 19374:770689bd7730 draft

(svn r24275) -Codechange: Make SmallVector::FindIndex() const.
author frosch <frosch@openttd.org>
date Fri, 25 May 2012 20:52:11 +0000
parents 1898872dde54
children c890215c5f1f
files src/core/smallvec_type.hpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -148,10 +148,10 @@
 	 * @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++;