summaryrefslogtreecommitdiff
path: root/modules/gdnative/gdnative.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-24 14:21:06 +0200
committerGitHub <noreply@github.com>2021-07-24 14:21:06 +0200
commit96d7bc62af25b85b8b9cc091eeea1e7a784ba624 (patch)
tree83d8a70c911fe7f8d20080a1395d195eb8370d05 /modules/gdnative/gdnative.cpp
parent9ac27b58c53b50b5c7085a8fdee653e9eff159d1 (diff)
parent4e6efd1b07f1c6d53d226977ddc729333b74306a (diff)
Merge pull request #50511 from aaronfranke/iterators
Use C++ range iterators for Lists in many situations
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
-rw-r--r--modules/gdnative/gdnative.cpp16
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;