Merge pull request #101027 from Ivorforce/localvector-reverse
Rename `LocalVector.invert()` -> `LocalVector.reverse()` to match the `Vector`, `String` and `List` APIs.
This commit is contained in:
@ -126,11 +126,14 @@ public:
|
|||||||
return occurrences;
|
return occurrences;
|
||||||
}
|
}
|
||||||
|
|
||||||
void invert() {
|
void reverse() {
|
||||||
for (U i = 0; i < count / 2; i++) {
|
for (U i = 0; i < count / 2; i++) {
|
||||||
SWAP(data[i], data[count - i - 1]);
|
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 clear() { resize(0); }
|
||||||
_FORCE_INLINE_ void reset() {
|
_FORCE_INLINE_ void reset() {
|
||||||
|
|||||||
@ -103,10 +103,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void path_reverse() {
|
void path_reverse() {
|
||||||
path_points.invert();
|
path_points.reverse();
|
||||||
path_meta_point_types.invert();
|
path_meta_point_types.reverse();
|
||||||
path_meta_point_rids.invert();
|
path_meta_point_rids.reverse();
|
||||||
path_meta_point_owners.invert();
|
path_meta_point_owners.reverse();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -104,10 +104,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void path_reverse() {
|
void path_reverse() {
|
||||||
path_points.invert();
|
path_points.reverse();
|
||||||
path_meta_point_types.invert();
|
path_meta_point_types.reverse();
|
||||||
path_meta_point_rids.invert();
|
path_meta_point_rids.reverse();
|
||||||
path_meta_point_owners.invert();
|
path_meta_point_owners.reverse();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user