diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-07-25 12:52:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 12:52:58 +0200 |
commit | ff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63 (patch) | |
tree | 42543cc85d27d2c8692a2ced4bac5c537e402004 /core/io/packed_data_container.cpp | |
parent | 2f221e5fd507b176590bda52d08e499629ce7761 (diff) | |
parent | ac3322b0af8f23e8e2dac8111200bc69b5604c9f (diff) | |
download | redot-engine-ff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63.tar.gz |
Merge pull request #50809 from akien-mga/iterators-const-references
Diffstat (limited to 'core/io/packed_data_container.cpp')
-rw-r--r-- | core/io/packed_data_container.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/packed_data_container.cpp b/core/io/packed_data_container.cpp index ec43ea9311..4a76f0191d 100644 --- a/core/io/packed_data_container.cpp +++ b/core/io/packed_data_container.cpp @@ -268,7 +268,7 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd d.get_key_list(&keys); List<DictKey> sortk; - for (Variant &key : keys) { + for (const Variant &key : keys) { DictKey dk; dk.hash = key.hash(); dk.key = key; @@ -278,7 +278,7 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd sortk.sort(); int idx = 0; - for (DictKey &E : sortk) { + for (const DictKey &E : sortk) { encode_uint32(E.hash, &tmpdata.write[pos + 8 + idx * 12 + 0]); uint32_t ofs = _pack(E.key, tmpdata, string_cache); encode_uint32(ofs, &tmpdata.write[pos + 8 + idx * 12 + 4]); |