1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +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

@@ -94,7 +94,7 @@ void SceneTreeTimer::release_connections() {
List<Connection> connections;
get_all_signal_connections(&connections);
for (Connection &connection : connections) {
for (const Connection &connection : connections) {
disconnect(connection.signal.get_name(), connection.callable);
}
}
@@ -1402,7 +1402,7 @@ SceneTree::SceneTree() {
List<String> exts;
ResourceLoader::get_recognized_extensions_for_type("Environment", &exts);
String ext_hint;
for (String &E : exts) {
for (const String &E : exts) {
if (ext_hint != String()) {
ext_hint += ",";
}