summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2022-09-28 15:33:41 +0100
committerlawnjelly <lawnjelly@gmail.com>2022-09-28 15:33:41 +0100
commitd7c6993f5892c2913da2dfa8669dda099caf7068 (patch)
tree38423cec8dfe5fe1286b64ddce5bf6e7e2548e58
parent03410efa15b88fc1e55476efb6b47d5079d34c96 (diff)
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.
-rw-r--r--core/math/bvh_tree.h2
1 files changed, 1 insertions, 1 deletions
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