mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Alos add a const version of lookup_ptr for OAHashMap, similar to 62e9044837
.
This commit is contained in:
parent
dacb9e650f
commit
1e0353e179
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user