summaryrefslogtreecommitdiff
path: root/scene/main/node.h
diff options
context:
space:
mode:
authorMiguel Gonzalez Sanchez <822035+bitbrain@users.noreply.github.com>2022-10-14 19:21:41 +0100
committerMiguel Gonzalez Sanchez <822035+bitbrain@users.noreply.github.com>2022-10-14 19:56:34 +0100
commita97a00bf02b90841097ae85dd344f7a949bf3457 (patch)
tree26f30f48319165b7ee1fac3c3120ff3defb112a6 /scene/main/node.h
parent39534a7aecc4ca4215af67244b23dda09ea339f8 (diff)
Rename pos -> index on Node
Diffstat (limited to 'scene/main/node.h')
-rw-r--r--scene/main/node.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/main/node.h b/scene/main/node.h
index 8c82c41e46..c8c8c395ce 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -105,7 +105,7 @@ private:
int internal_children_front = 0;
int internal_children_back = 0;
- int pos = -1;
+ int index = -1;
int depth = -1;
int blocked = 0; // Safeguard that throws an error when attempting to modify the tree in a harmful way while being traversed.
StringName name;
@@ -187,8 +187,8 @@ private:
Error _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Error _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
- _FORCE_INLINE_ bool _is_internal_front() const { return data.parent && data.pos < data.parent->data.internal_children_front; }
- _FORCE_INLINE_ bool _is_internal_back() const { return data.parent && data.pos >= data.parent->data.children.size() - data.parent->data.internal_children_back; }
+ _FORCE_INLINE_ bool _is_internal_front() const { return data.parent && data.index < data.parent->data.internal_children_front; }
+ _FORCE_INLINE_ bool _is_internal_back() const { return data.parent && data.index >= data.parent->data.children.size() - data.parent->data.internal_children_back; }
friend class SceneTree;
@@ -347,8 +347,8 @@ public:
void get_groups(List<GroupInfo> *p_groups) const;
int get_persistent_group_count() const;
- void move_child(Node *p_child, int p_pos);
- void _move_child(Node *p_child, int p_pos, bool p_ignore_end = false);
+ void move_child(Node *p_child, int p_index);
+ void _move_child(Node *p_child, int p_index, bool p_ignore_end = false);
void set_owner(Node *p_owner);
Node *get_owner() const;