Added lookup_ptr method to OAHashMap.

This commit is contained in:
Relintai 2022-03-23 15:06:29 +01:00
parent 53066a4a82
commit efddf93a8e

View File

@ -236,6 +236,17 @@ public:
return false;
}
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;
}
_FORCE_INLINE_ bool has(const TKey &p_key) const {
uint32_t _pos = 0;
return _lookup_pos(p_key, _pos);