diff options
author | Nazarii <nazarii.yablonskyi.pp.2022@lpnu.ua> | 2024-10-31 18:47:17 +0200 |
---|---|---|
committer | Nazarii <nazarii.yablonskyi.pp.2022@lpnu.ua> | 2024-10-31 19:26:02 +0200 |
commit | d1dc7afdd5bf60bc14c34284c1fefb3836b65667 (patch) | |
tree | f65b914fb0d2a64130893a8320b5943e74e733e2 /core/templates/a_hash_map.h | |
parent | 61accf060515416da07d913580419fd8c8490f7b (diff) | |
download | redot-engine-d1dc7afdd5bf60bc14c34284c1fefb3836b65667.tar.gz |
Fix `capture_cache.animation` was not cached
Diffstat (limited to 'core/templates/a_hash_map.h')
-rw-r--r-- | core/templates/a_hash_map.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/templates/a_hash_map.h b/core/templates/a_hash_map.h index 29983ea268..6e3a978d50 100644 --- a/core/templates/a_hash_map.h +++ b/core/templates/a_hash_map.h @@ -622,10 +622,11 @@ public: } // Inserts an element without checking if it already exists. - void insert_new(const TKey &p_key, const TValue &p_value) { + Iterator insert_new(const TKey &p_key, const TValue &p_value) { DEV_ASSERT(!has(p_key)); uint32_t hash = _hash(p_key); - _insert_element(p_key, p_value, hash); + uint32_t pos = _insert_element(p_key, p_value, hash); + return Iterator(elements + pos, elements, elements + num_elements); } /* Array methods. */ |