summaryrefslogtreecommitdiff
path: root/core/templates
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-09-01 14:25:01 +0200
committerGitHub <noreply@github.com>2021-09-01 14:25:01 +0200
commitac7541c1b1f435587afb1d7b74129c813a1c84dc (patch)
tree64eae46f84e74f15c8283a37f9be70244747ef6a /core/templates
parenta2f808fc9235b581d9b4aaec561154c49a4b55ab (diff)
parent87b985a6aa8db234c349d8ed505f9c729cffc8b3 (diff)
Merge pull request #52026 from Calinou/constiterator-fix-const
Fix ConstIterator to allow `for` range loops on Packed*Array
Diffstat (limited to 'core/templates')
-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; }