diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-12 12:36:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 12:36:43 +0200 |
commit | edda6ee9f82ec94f993ebf44486ab7d8abcef193 (patch) | |
tree | 691c51ea7516990b94303afa334d70c66c512cc4 /scene/resources/packed_scene.cpp | |
parent | 9b7e16a6b8b80fe61881e8f4df28550e18050dd2 (diff) | |
parent | 8b7c7f5a753b43cec10f72b274bb1d70c253652b (diff) |
Merge pull request #60881 from reduz/new-hash-map
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r-- | scene/resources/packed_scene.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index eaf26c5225..12d1dc9925 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -913,10 +913,10 @@ Error SceneState::pack(Node *p_scene) { } variants.resize(variant_map.size()); - const Variant *K = nullptr; - while ((K = variant_map.next(K))) { - int idx = variant_map[*K]; - variants.write[idx] = *K; + + for (const KeyValue<Variant, int> &E : variant_map) { + int idx = E.value; + variants.write[idx] = E.key; } node_paths.resize(nodepath_map.size()); |