diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-07 09:04:44 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-07 09:04:44 +0200 |
commit | e63252b4219680d109bfa41c24f483e97b37f40e (patch) | |
tree | 8b8af6d7efcab9b2692d45dec65449fd83d2c8b9 /editor/plugins/text_shader_editor.cpp | |
parent | 570220ba9b127325f1a5aa7bb17d5c6f76ccf62c (diff) | |
parent | 955d5affa857ec1f358c56da8fb1ff4ab6590704 (diff) | |
download | redot-engine-e63252b4219680d109bfa41c24f483e97b37f40e.tar.gz |
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
Diffstat (limited to 'editor/plugins/text_shader_editor.cpp')
-rw-r--r-- | editor/plugins/text_shader_editor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp index a1d1df0f83..42719e992e 100644 --- a/editor/plugins/text_shader_editor.cpp +++ b/editor/plugins/text_shader_editor.cpp @@ -583,9 +583,7 @@ void ShaderTextEditor::_update_warning_panel() { int warning_count = 0; warnings_panel->push_table(2); - for (int i = 0; i < warnings.size(); i++) { - ShaderWarning &w = warnings[i]; - + for (const ShaderWarning &w : warnings) { if (warning_count == 0) { if (saved_treat_warning_as_errors) { String error_text = "error(" + itos(w.get_line()) + "): " + w.get_message() + " " + TTR("Warnings should be fixed to prevent errors."); |