فهرست منبع

Call CRASH_COND_MSG if key not found in HashMap get function.

(cherry picked from commit 1b05f449f0584ff29a9f340b1c7c310a52aec7b1)
Marcel Admiraal 5 سال پیش
والد
کامیت
50d69a5a3d
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      core/hash_map.h

+ 2 - 2
core/hash_map.h

@@ -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;
 	}