diff options
author | Lightning_A <aaronjrecord@gmail.com> | 2021-08-09 14:13:42 -0600 |
---|---|---|
committer | Lightning_A <aaronjrecord@gmail.com> | 2021-09-30 15:09:12 -0600 |
commit | c63b18507d21b8a213c073bced9057b571cdcd7a (patch) | |
tree | 96b8f7532ae5d923b75bfbac8d6763015b6646bb /editor/doc_tools.cpp | |
parent | e4dfa69bcf58e4d50acdde32c590364e43fce3ab (diff) |
Use range iterators for `Map`
Diffstat (limited to 'editor/doc_tools.cpp')
-rw-r--r-- | editor/doc_tools.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index ec162231e9..beead74c53 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -44,8 +44,8 @@ #include "modules/modules_enabled.gen.h" void DocTools::merge_from(const DocTools &p_data) { - for (Map<String, DocData::ClassDoc>::Element *E = class_list.front(); E; E = E->next()) { - DocData::ClassDoc &c = E->get(); + for (KeyValue<String, DocData::ClassDoc> &E : class_list) { + DocData::ClassDoc &c = E.value; if (!p_data.class_list.has(c.name)) { continue; @@ -185,9 +185,9 @@ void DocTools::merge_from(const DocTools &p_data) { } void DocTools::remove_from(const DocTools &p_data) { - for (Map<String, DocData::ClassDoc>::Element *E = p_data.class_list.front(); E; E = E->next()) { - if (class_list.has(E->key())) { - class_list.erase(E->key()); + for (const KeyValue<String, DocData::ClassDoc> &E : p_data.class_list) { + if (class_list.has(E.key)) { + class_list.erase(E.key); } } } @@ -1227,8 +1227,8 @@ static void _write_method_doc(FileAccess *f, const String &p_name, Vector<DocDat } Error DocTools::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) { - for (Map<String, DocData::ClassDoc>::Element *E = class_list.front(); E; E = E->next()) { - DocData::ClassDoc &c = E->get(); + for (KeyValue<String, DocData::ClassDoc> &E : class_list) { + DocData::ClassDoc &c = E.value; String save_path; if (p_class_path.has(c.name)) { |