summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-25 20:52:11 +0000
committerfrosch <frosch@openttd.org>2012-05-25 20:52:11 +0000
commite1617a3d109400a3037688730adacb7a07cf9df4 (patch)
treee8cca596b38b15c209657fd6bfc09c1674836b50 /src/core
parentde3b05388da7371f58124008aa1bc534aae48b6e (diff)
downloadopenttd-e1617a3d109400a3037688730adacb7a07cf9df4.tar.xz
(svn r24275) -Codechange: Make SmallVector::FindIndex() const.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/smallvec_type.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index c230b4750..d70505e8c 100644
--- 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++;