From d1dc7afdd5bf60bc14c34284c1fefb3836b65667 Mon Sep 17 00:00:00 2001 From: Nazarii Date: Thu, 31 Oct 2024 18:47:17 +0200 Subject: Fix `capture_cache.animation` was not cached --- core/templates/a_hash_map.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/templates/a_hash_map.h') 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. */ -- cgit v1.2.3