diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h index 6c38e4d71..360d88f9e 100644 --- a/core/oa_hash_map.h +++ b/core/oa_hash_map.h @@ -236,7 +236,18 @@ public: return false; } - TValue *lookup_ptr(const TKey &p_key) const { + const TValue *lookup_ptr(const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + + if (exists) { + return &values[pos]; + } + + return nullptr; + } + + TValue *lookup_ptr(const TKey &p_key) { uint32_t pos = 0; bool exists = _lookup_pos(p_key, pos);