浏览代码

Fix array-bounds warning in BVH

Provides a workaround to prevent tripping a compiler warning.

(cherry picked from commit 91d252c69795cdfc53e71c553edcff665636ea16)
lawnjelly 3 年之前
父节点
当前提交
2ef0052113
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      core/math/bvh_structs.inc

+ 4 - 0
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
 	}
 };