Browse Source

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.
lawnjelly 3 năm trước cách đây
mục cha
commit
d7c6993f58
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      core/math/bvh_tree.h

+ 1 - 1
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