From ac3322b0af8f23e8e2dac8111200bc69b5604c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 24 Jul 2021 15:46:25 +0200 Subject: Use const references where possible for List range iterators --- core/string/ustring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/string/ustring.cpp') diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index dbb8dc8283..7beecdb6b5 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3421,7 +3421,7 @@ String String::format(const Variant &values, String placeholder) const { List keys; d.get_key_list(&keys); - for (Variant &key : keys) { + for (const Variant &key : keys) { new_string = new_string.replace(placeholder.replace("_", key), d[key]); } } else { -- cgit v1.2.3