mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Call CRASH_COND_MSG if key not found in HashMap get function.
(cherry picked from commit 1b05f449f0)
This commit is contained in:
committed by
Rémi Verschelde
parent
22863363a7
commit
50d69a5a3d
@@ -294,14 +294,14 @@ public:
|
||||
const TData &get(const TKey &p_key) const {
|
||||
|
||||
const TData *res = getptr(p_key);
|
||||
ERR_FAIL_COND_V(!res, *res);
|
||||
CRASH_COND_MSG(!res, "Map key not found.");
|
||||
return *res;
|
||||
}
|
||||
|
||||
TData &get(const TKey &p_key) {
|
||||
|
||||
TData *res = getptr(p_key);
|
||||
ERR_FAIL_COND_V(!res, *res);
|
||||
CRASH_COND_MSG(!res, "Map key not found.");
|
||||
return *res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user