File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class Array {
5454 _FORCE_INLINE_ ConstIterator &operator --();
5555
5656 _FORCE_INLINE_ bool operator ==(const ConstIterator &p_other) const { return element_ptr == p_other.element_ptr ; }
57- _FORCE_INLINE_ bool operator !=(const ConstIterator &p_other) const { return element_ptr = = p_other.element_ptr ; }
57+ _FORCE_INLINE_ bool operator !=(const ConstIterator &p_other) const { return element_ptr ! = p_other.element_ptr ; }
5858
5959 _FORCE_INLINE_ ConstIterator (const Variant *p_element_ptr, Variant *p_read_only = nullptr ) :
6060 element_ptr(p_element_ptr), read_only(p_read_only) {}
Original file line number Diff line number Diff line change @@ -555,13 +555,17 @@ TEST_CASE("[Array] Iteration") {
555555 idx++;
556556 }
557557
558+ CHECK_EQ (idx, a1.size ());
559+
558560 idx = 0 ;
559561
560562 for (const Variant &E : (const Array &)a1) {
561563 CHECK_EQ (int (a2[idx]), int (E));
562564 idx++;
563565 }
564566
567+ CHECK_EQ (idx, a1.size ());
568+
565569 a1.clear ();
566570}
567571
You can’t perform that action at this time.
0 commit comments