diff options
Diffstat (limited to 'editor/editor_folding.cpp')
-rw-r--r-- | editor/editor_folding.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 76c7023b46..9e1b361f64 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -40,8 +40,8 @@ Vector<String> EditorFolding::_get_unfolds(const Object *p_object) { if (sections.size()) { String *w = sections.ptrw(); int idx = 0; - for (const Set<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) { - w[idx++] = E->get(); + for (const String &E : p_object->editor_get_section_folding()) { + w[idx++] = E; } } @@ -87,7 +87,7 @@ void EditorFolding::load_resource_folding(Ref<Resource> p_resource, const String _set_unfolds(p_resource.ptr(), unfolds); } -void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, Set<Ref<Resource>> &resources) { +void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, HashSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -140,7 +140,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path config.instantiate(); Array unfolds, res_unfolds; - Set<Ref<Resource>> resources; + HashSet<Ref<Resource>> resources; Array nodes_folded; _fill_folds(p_scene, p_scene, unfolds, res_unfolds, nodes_folded, resources); @@ -220,13 +220,13 @@ bool EditorFolding::has_folding_data(const String &p_path) { return FileAccess::exists(file); } -void EditorFolding::_do_object_unfolds(Object *p_object, Set<Ref<Resource>> &resources) { +void EditorFolding::_do_object_unfolds(Object *p_object, HashSet<Ref<Resource>> &resources) { List<PropertyInfo> plist; p_object->get_property_list(&plist); String group_base; String group; - Set<String> unfold_group; + HashSet<String> unfold_group; for (const PropertyInfo &E : plist) { if (E.usage & PROPERTY_USAGE_CATEGORY) { @@ -270,12 +270,12 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<Ref<Resource>> &res } } - for (Set<String>::Element *E = unfold_group.front(); E; E = E->next()) { - p_object->editor_set_section_unfold(E->get(), true); + for (const String &E : unfold_group) { + p_object->editor_set_section_unfold(E, true); } } -void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<Ref<Resource>> &resources) { +void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, HashSet<Ref<Resource>> &resources) { if (p_root != p_node) { if (!p_node->get_owner()) { return; //not owned, bye @@ -293,7 +293,7 @@ void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, Set<Ref<Resourc } void EditorFolding::unfold_scene(Node *p_scene) { - Set<Ref<Resource>> resources; + HashSet<Ref<Resource>> resources; _do_node_unfolds(p_scene, p_scene, resources); } |