From 3127cc4fd42f6a549d65bc7242eb4a3818f28476 Mon Sep 17 00:00:00 2001 From: AndreaCatania Date: Sun, 22 Aug 2021 18:19:04 +0200 Subject: 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. --- core/templates/vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3