summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-08-08 00:52:20 +0200
committerkobewi <kobewi4e@gmail.com>2022-08-24 12:53:36 +0200
commitf7f4873ed08d6b465c8108f7ce0c1cb76f9caf2f (patch)
treef5644c01ab66109f8f342d784c3a38240aa295ef /scene
parent0626ce50cfd35d1eb81c6c9627f8540be9636b4b (diff)
Replace Array return types with TypedArray 3
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tree.cpp4
-rw-r--r--scene/gui/tree.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index ede7bfb0bf..52b45054a7 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -748,10 +748,10 @@ int TreeItem::get_child_count() {
return children_cache.size();
}
-Array TreeItem::get_children() {
+TypedArray<TreeItem> TreeItem::get_children() {
// Don't need to explicitly create children cache, because get_child_count creates it.
int size = get_child_count();
- Array arr;
+ TypedArray<TreeItem> arr;
arr.resize(size);
for (int i = 0; i < size; i++) {
arr[i] = children_cache[i];
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index bcc2419b80..7f9c00b1b9 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -339,7 +339,7 @@ public:
TreeItem *get_child(int p_idx);
int get_visible_child_count();
int get_child_count();
- Array get_children();
+ TypedArray<TreeItem> get_children();
int get_index();
#ifdef DEV_ENABLED