From d7c6993f5892c2913da2dfa8669dda099caf7068 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Wed, 28 Sep 2022 15:33:41 +0100 Subject: Fix false flag compiler warning in bvh tree Compiler wrongly warns that sibling_id may be used when uninitialized. This PR sets the value to silence the warning. --- core/math/bvh_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/bvh_tree.h b/core/math/bvh_tree.h index cdb2bb4413..8291394b31 100644 --- a/core/math/bvh_tree.h +++ b/core/math/bvh_tree.h @@ -235,7 +235,7 @@ private: // no need to keep back references for children at the moment - uint32_t sibling_id; // always a node id, as tnode is never a leaf + uint32_t sibling_id = 0; // always a node id, as tnode is never a leaf bool sibling_present = false; // if there are more children, or this is the root node, don't try and delete -- cgit v1.2.3