RTree
RTree copied to clipboard
Warning in PickBranch
There is a warning in Pickbranch:
Variable 'bestArea' may be uninitialized when used here
at line:
else if ((increase == bestIncr) && (area < bestArea))
Best regards Ben
Hi Ben,
I added -Wall -Wpedantic -Wextra
to the compiler call, but your warning did not appear (but I fixed some others: b45759b08016910ac8ef132340c882f3ba3805d1). What setup do you use?
Best Alex
Appeared to me using Visual C++ 2019 under Debug builds. It's a false positive, but you can silent it by initializing to some value:
ELEMTYPEREAL bestArea = (ELEMTYPEREAL)-1;