diff options
author | Aaron Record <aaronjrecord@gmail.com> | 2022-05-18 17:43:40 -0600 |
---|---|---|
committer | Aaron Record <aaronjrecord@gmail.com> | 2022-05-19 12:09:16 +0200 |
commit | 900c676b0282bed83d00834e3c280ac89c2bc94d (patch) | |
tree | b6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /scene/debugger | |
parent | 71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff) |
Use range iterators for RBSet in most cases
Diffstat (limited to 'scene/debugger')
-rw-r--r-- | scene/debugger/scene_debugger.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index b792b11dbc..dfad91ecd5 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -436,11 +436,11 @@ void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInsta // Members for (KeyValue<const Script *, RBSet<StringName>> sm : members) { - for (RBSet<StringName>::Element *E = sm.value.front(); E; E = E->next()) { + for (const StringName &E : sm.value) { Variant m; - if (p_instance->get(E->get(), m)) { + if (p_instance->get(E, m)) { String script_path = sm.key == p_script ? "" : sm.key->get_path().get_file() + "/"; - PropertyInfo pi(m.get_type(), "Members/" + script_path + E->get()); + PropertyInfo pi(m.get_type(), "Members/" + script_path + E); properties.push_back(SceneDebuggerProperty(pi, m)); } } @@ -629,8 +629,8 @@ void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Varian return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -673,8 +673,8 @@ void LiveEditor::_node_call_func(int p_id, const StringName &p_method, const Var return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -758,8 +758,8 @@ void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_typ return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -802,8 +802,8 @@ void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_p return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -968,8 +968,8 @@ void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_ return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; @@ -1007,8 +1007,8 @@ void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new return; //scene not editable } - for (RBSet<Node *>::Element *F = E->value.front(); F; F = F->next()) { - Node *n = F->get(); + for (Node *F : E->value) { + Node *n = F; if (base && !base->is_ancestor_of(n)) { continue; |