diff options
| author | Aaron Franke <arnfranke@yahoo.com> | 2021-07-15 23:45:57 -0400 |
|---|---|---|
| committer | Aaron Franke <arnfranke@yahoo.com> | 2021-07-23 17:38:28 -0400 |
| commit | 4e6efd1b07f1c6d53d226977ddc729333b74306a (patch) | |
| tree | a52f672e7f622bb65e3b65f2a2edc9d19b1ecdcf /modules/gdnative/gdnative.cpp | |
| parent | b918c4c3ce84af1f8af2d06ef31784f48a15551a (diff) | |
| download | redot-engine-4e6efd1b07f1c6d53d226977ddc729333b74306a.tar.gz | |
Use C++ iterators for Lists in many situations
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
| -rw-r--r-- | modules/gdnative/gdnative.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 1ff591a87f..b585ad15bf 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -129,9 +129,7 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const { config_file->get_section_keys("entry", &entry_key_list); } - for (List<String>::Element *E = entry_key_list.front(); E; E = E->next()) { - String key = E->get(); - + for (String &key : entry_key_list) { PropertyInfo prop; prop.type = Variant::STRING; @@ -147,9 +145,7 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const { config_file->get_section_keys("dependencies", &dependency_key_list); } - for (List<String>::Element *E = dependency_key_list.front(); E; E = E->next()) { - String key = E->get(); - + for (String &key : dependency_key_list) { PropertyInfo prop; prop.type = Variant::STRING; @@ -175,9 +171,7 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) { p_config_file->get_section_keys("entry", &entry_keys); } - for (List<String>::Element *E = entry_keys.front(); E; E = E->next()) { - String key = E->get(); - + for (String &key : entry_keys) { Vector<String> tags = key.split("."); bool skip = false; @@ -207,9 +201,7 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) { p_config_file->get_section_keys("dependencies", &dependency_keys); } - for (List<String>::Element *E = dependency_keys.front(); E; E = E->next()) { - String key = E->get(); - + for (String &key : dependency_keys) { Vector<String> tags = key.split("."); bool skip = false; |
