summaryrefslogtreecommitdiffstats
path: root/core/io/resource_format_binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r--core/io/resource_format_binary.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 5c8f4746b3..d0a8200546 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -1844,8 +1844,8 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V
f->store_32(VARIANT_ARRAY);
Array a = p_property;
f->store_32(uint32_t(a.size()));
- for (int i = 0; i < a.size(); i++) {
- write_variant(f, a[i], resource_map, external_resources, string_map);
+ for (const Variant &var : a) {
+ write_variant(f, var, resource_map, external_resources, string_map);
}
} break;
@@ -2017,9 +2017,7 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
case Variant::ARRAY: {
Array varray = p_variant;
_find_resources(varray.get_typed_script());
- int len = varray.size();
- for (int i = 0; i < len; i++) {
- const Variant &v = varray.get(i);
+ for (const Variant &v : varray) {
_find_resources(v);
}