Skip to content

Commit 135616d

Browse files
committed
Fix remove unnecessary null pointer checks, issue #257.
There only appeared to be one obvious case left. Code search process: grep -C 3 delete . ... then look for if statements, in C-like code, conditioned on the same variable, and no other obvious purpose that required the if statement. Signed-off-by: Eric Powers <[email protected]>
1 parent 4ab3f27 commit 135616d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nanovdb/nanovdb/tools/GridBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ void Grid<BuildT>::operator()(const Func& func, const CoordBBox& bbox, ValueType
19681968
NANOVDB_ASSERT(leaf == nullptr);
19691969
}
19701970
}// loop over sub-part of leafBBox
1971-
if (leaf) delete leaf;
1971+
delete leaf;
19721972
});
19731973

19741974
// Prune leaf and tile nodes

0 commit comments

Comments
 (0)