diff options
author | AndreaCatania <info@andreacatania.com> | 2021-08-22 18:19:04 +0200 |
---|---|---|
committer | AndreaCatania <info@andreacatania.com> | 2021-08-30 21:09:05 +0200 |
commit | 3127cc4fd42f6a549d65bc7242eb4a3818f28476 (patch) | |
tree | 7be8caeca5d87c9c80f20e901b376a14627c58f3 | |
parent | d67c5a8e82df7c2840efa1238b7f673027fe0282 (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.
-rw-r--r-- | core/templates/vector.h | 2 |
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; } |