summaryrefslogtreecommitdiff
path: root/core/templates/vector.h
diff options
context:
space:
mode:
authorAndreaCatania <info@andreacatania.com>2021-08-22 18:19:04 +0200
committerAndreaCatania <info@andreacatania.com>2021-08-22 18:19:04 +0200
commitde0991d801210462860f510ecfbfa9f45de2e0b4 (patch)
tree7be8caeca5d87c9c80f20e901b376a14627c58f3 /core/templates/vector.h
parentd67c5a8e82df7c2840efa1238b7f673027fe0282 (diff)
Fix Vector ConstIterator constructor.
The constructor was expecting a mutable pointer, while the passed pointer was immutable ( returns a const pointer), so the compilation was failing when iterating a constant .
Diffstat (limited to 'core/templates/vector.h')
-rw-r--r--core/templates/vector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/vector.h b/core/templates/vector.h
index 08cbef6ba4..033345d04c 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -229,7 +229,7 @@ public:
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
- ConstIterator(T *p_ptr) { elem_ptr = p_ptr; }
+ ConstIterator(const T *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }