summaryrefslogtreecommitdiff
path: root/core/config
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-25 12:52:58 +0200
committerGitHub <noreply@github.com>2021-07-25 12:52:58 +0200
commitff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63 (patch)
tree42543cc85d27d2c8692a2ced4bac5c537e402004 /core/config
parent2f221e5fd507b176590bda52d08e499629ce7761 (diff)
parentac3322b0af8f23e8e2dac8111200bc69b5604c9f (diff)
Merge pull request #50809 from akien-mga/iterators-const-references
Diffstat (limited to 'core/config')
-rw-r--r--core/config/engine.cpp2
-rw-r--r--core/config/project_settings.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index c03c872f17..0b5b5627af 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -214,7 +214,7 @@ bool Engine::has_singleton(const String &p_name) const {
}
void Engine::get_singletons(List<Singleton> *p_singletons) {
- for (Singleton &E : singletons) {
+ for (const Singleton &E : singletons) {
p_singletons->push_back(E);
}
}
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 22acb23bce..c5e6c6d685 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -800,7 +800,7 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
if (E->key() != "") {
file->store_string("[" + E->key() + "]\n\n");
}
- for (String &F : E->get()) {
+ for (const String &F : E->get()) {
String key = F;
if (E->key() != "") {
key = E->key() + "/" + key;
@@ -928,7 +928,7 @@ Vector<String> ProjectSettings::get_optimizer_presets() const {
ProjectSettings::get_singleton()->get_property_list(&pi);
Vector<String> names;
- for (PropertyInfo &E : pi) {
+ for (const PropertyInfo &E : pi) {
if (!E.name.begins_with("optimizer_presets/")) {
continue;
}