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/variant/variant_setget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/variant/variant_setget.cpp') diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index 62228ea87c..ae3c7685fd 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -1093,7 +1093,7 @@ void Variant::get_property_list(List *p_list) const { const Dictionary *dic = reinterpret_cast(_data._mem); List keys; dic->get_key_list(&keys); - for (Variant &E : keys) { + for (const Variant &E : keys) { if (E.get_type() == Variant::STRING) { p_list->push_back(PropertyInfo(Variant::STRING, E)); } @@ -1106,7 +1106,7 @@ void Variant::get_property_list(List *p_list) const { } else { List members; get_member_list(type, &members); - for (StringName &E : members) { + for (const StringName &E : members) { PropertyInfo pi; pi.name = E; pi.type = get_member_type(type, E); -- cgit v1.2.3