AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
[REQUEST] AttributeWriteHandle::UniquePtr typedef
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 774
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
The AttributeWriteHandle in AttributeArray.h has a typedef for a std::unique_ptr but it is ScopedPtr, not UniquePtr. Unfortunately as this is named differently to the AttributeHandle::UniquePtr it doesnt override that typedef (which the AttributeWriteHandle inherits from the AttributeHandle) so using AttributeWriteHandle::UniquePtr (which is valid) creates a AttributeHandle::UniquePtr (note: not a write handle). I imagine this is not intended as it is pretty confusing.
I think it would be better to rename the ScopedPtr typedef in the AttributeWriteHandle definition to UniquePtr (why was this different anyway?) or at least add a new UniquePtr typedef in AttributeWriteHandle for a unique ptr so that this doesn't happen.
Not a huge issue but just something I stumbled upon.
Contributor guide
Research direction
Open AttributeArray.h and compare the AttributeWriteHandle typedefs with the inherited AttributeHandle typedefs. Confirm how AttributeWriteHandle::UniquePtr currently resolves, then update the typedef naming so the write-handle alias is unambiguous and verify the surrounding C++ tests or build still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100