mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Rename LocalVector.invert() -> LocalVector.reverse() to match the Vector, String and List APIs.
This commit is contained in:
parent
931820d33c
commit
d74ef8cb01
3 changed files with 12 additions and 9 deletions
|
|
@ -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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue