AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
Remove unnecessary null pointer checks
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 774
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
[An extra null pointer check is not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null "Do I need to check for null before delete p?") like the following.
- [DensityOp](https://github.com/dreamworksanimation/openvdb/blob/18568814988362db3b6d661491a8179e6cec71de/openvdb_houdini/houdini/SOP_OpenVDB_Rasterize_Points.cc#L1547 "Destructor for DensityOp")
- [OpFactory::setObsoleteParms](https://github.com/dreamworksanimation/openvdb/blob/a7a1abde7c955d5a83acac2c82341497d73576c2/openvdb_houdini/houdini/ParmFactory.cc#L1232)
- [TestDenseSparseTools:tearDown](https://github.com/dreamworksanimation/openvdb/blob/a7a1abde7c955d5a83acac2c82341497d73576c2/openvdb/unittest/TestDenseSparseTools.cc#L44)
Contributor guide
Research direction
Start by reviewing the three linked locations: SOP_OpenVDB_Rasterize_Points.cc, ParmFactory.cc, and TestDenseSparseTools.cc. Compare each null check with the linked C++ guidance, remove only the unnecessary checks, and run the TestDenseSparseTools test along with relevant project tests to confirm the cleanup is safe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100