mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Use const references where possible for List range iterators
This commit is contained in:
parent
a0f7f42b84
commit
ac3322b0af
171 changed files with 649 additions and 650 deletions
|
|
@ -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 += ",";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue