From 92299989bd10fd9855b6d77bc2bfabae218d1eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 26 Jul 2021 17:50:35 +0200 Subject: Use Ref references as iterators where relevant And const when possible. --- modules/gdscript/gdscript.cpp | 28 ++++++++++++++-------------- modules/mono/csharp_script.cpp | 10 +++++----- modules/webrtc/webrtc_multiplayer_peer.cpp | 10 +++++----- modules/websocket/wsl_server.cpp | 4 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'modules') diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index bcb53508ea..8957b00a1b 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1804,10 +1804,10 @@ void GDScriptLanguage::reload_all_scripts() { scripts.sort_custom(); //update in inheritance dependency order - for (Ref E : scripts) { - print_verbose("GDScript: Reloading: " + E->get_path()); - E->load_source_code(E->get_path()); - E->reload(true); + for (Ref &script : scripts) { + print_verbose("GDScript: Reloading: " + script->get_path()); + script->load_source_code(script->get_path()); + script->reload(true); } #endif } @@ -1836,21 +1836,21 @@ void GDScriptLanguage::reload_tool_script(const Ref