1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Use const references where possible for List range iterators

This commit is contained in:
Rémi Verschelde
2021-07-24 15:46:25 +02:00
parent a0f7f42b84
commit ac3322b0af
171 changed files with 649 additions and 650 deletions

View File

@@ -129,7 +129,7 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
config_file->get_section_keys("entry", &entry_key_list);
}
for (String &key : entry_key_list) {
for (const String &key : entry_key_list) {
PropertyInfo prop;
prop.type = Variant::STRING;
@@ -145,7 +145,7 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
config_file->get_section_keys("dependencies", &dependency_key_list);
}
for (String &key : dependency_key_list) {
for (const String &key : dependency_key_list) {
PropertyInfo prop;
prop.type = Variant::STRING;
@@ -171,7 +171,7 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) {
p_config_file->get_section_keys("entry", &entry_keys);
}
for (String &key : entry_keys) {
for (const String &key : entry_keys) {
Vector<String> tags = key.split(".");
bool skip = false;
@@ -201,7 +201,7 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) {
p_config_file->get_section_keys("dependencies", &dependency_keys);
}
for (String &key : dependency_keys) {
for (const String &key : dependency_keys) {
Vector<String> tags = key.split(".");
bool skip = false;