From 2ef00521130bd354a5cd052ee4d9e8f4c8ea5e49 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Thu, 22 Sep 2022 16:06:25 +0100 Subject: [PATCH] Fix array-bounds warning in BVH Provides a workaround to prevent tripping a compiler warning. (cherry picked from commit 91d252c69795cdfc53e71c553edcff665636ea16) --- core/math/bvh_structs.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/math/bvh_structs.inc b/core/math/bvh_structs.inc index b0d9ae36157..7b5cc2c3508 100644 --- a/core/math/bvh_structs.inc +++ b/core/math/bvh_structs.inc @@ -88,7 +88,11 @@ public: num_items++; return id; } +#ifdef DEV_ENABLED return -1; +#else + ERR_FAIL_V_MSG(0, "BVH request_item error."); +#endif } };