From 755c70b871c659df2d7c3a003593f38775dd7b5d Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 14 Mar 2021 07:21:32 +0000 Subject: Rename Array.invert() to Array.reverse() Does the same internally for List and Vector<>, which includes all PackedArray types. --- core/templates/list.h | 2 +- core/templates/vector.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/templates') diff --git a/core/templates/list.h b/core/templates/list.h index eaf1dbb4a0..010e35eed8 100644 --- a/core/templates/list.h +++ b/core/templates/list.h @@ -492,7 +492,7 @@ public: _data->last = p_I; } - void invert() { + void reverse() { int s = size() / 2; Element *F = front(); Element *B = back(); diff --git a/core/templates/vector.h b/core/templates/vector.h index 6a8902707c..a56a941dbc 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -74,7 +74,7 @@ public: remove(idx); } } - void invert(); + void reverse(); _FORCE_INLINE_ T *ptrw() { return _cowdata.ptrw(); } _FORCE_INLINE_ const T *ptr() const { return _cowdata.ptr(); } @@ -194,7 +194,7 @@ public: }; template -void Vector::invert() { +void Vector::reverse() { for (int i = 0; i < size() / 2; i++) { T *p = ptrw(); SWAP(p[i], p[size() - i - 1]); -- cgit v1.2.3