You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
-Fixed changes to default input actions not working, closes #10502
-Added Array.duplicate() method, needed to fix above
This commit is contained in:
@@ -210,6 +210,17 @@ const Variant &Array::get(int p_idx) const {
|
||||
return operator[](p_idx);
|
||||
}
|
||||
|
||||
Array Array::duplicate() const {
|
||||
|
||||
Array new_arr;
|
||||
int element_count = size();
|
||||
new_arr.resize(element_count);
|
||||
for (int i = 0; i < element_count; i++) {
|
||||
new_arr[i] = get(i);
|
||||
}
|
||||
|
||||
return new_arr;
|
||||
}
|
||||
struct _ArrayVariantSort {
|
||||
|
||||
_FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const {
|
||||
|
||||
Reference in New Issue
Block a user