Rename LocalVector.invert() -> LocalVector.reverse() to match the Vector, String and List APIs.

This commit is contained in:
Lukas Tenbrink
2025-01-02 16:48:54 +01:00
parent 931820d33c
commit d74ef8cb01
3 changed files with 12 additions and 9 deletions

View File

@ -126,11 +126,14 @@ public:
return occurrences;
}
void invert() {
void reverse() {
for (U i = 0; i < count / 2; i++) {
SWAP(data[i], data[count - i - 1]);
}
}
#ifndef DISABLE_DEPRECATED
[[deprecated("Use reverse() instead")]] void invert() { reverse(); }
#endif
_FORCE_INLINE_ void clear() { resize(0); }
_FORCE_INLINE_ void reset() {

View File

@ -103,10 +103,10 @@ public:
}
void path_reverse() {
path_points.invert();
path_meta_point_types.invert();
path_meta_point_rids.invert();
path_meta_point_owners.invert();
path_points.reverse();
path_meta_point_types.reverse();
path_meta_point_rids.reverse();
path_meta_point_owners.reverse();
}
};

View File

@ -104,10 +104,10 @@ public:
}
void path_reverse() {
path_points.invert();
path_meta_point_types.invert();
path_meta_point_rids.invert();
path_meta_point_owners.invert();
path_points.reverse();
path_meta_point_types.reverse();
path_meta_point_rids.reverse();
path_meta_point_owners.reverse();
}
};