diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-23 19:00:33 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-08-23 19:00:33 +0200 |
commit | 87b985a6aa8db234c349d8ed505f9c729cffc8b3 (patch) | |
tree | 7bbb591fef10892c83a523742815576c341bef09 | |
parent | 583b6a594ab88208d1e78c94e70a2957c316cf64 (diff) |
Fix ConstIterator to allow `for` range loops on Packed*Array
-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; } |