Merge pull request #52026 from Calinou/constiterator-fix-const

Fix ConstIterator to allow `for` range loops on Packed*Array
This commit is contained in:
Hugo Locurcio 2021-09-01 14:25:01 +02:00 committed by GitHub
commit ac7541c1b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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; }
_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() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; } ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }