AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
[BUG] NanoVDB: InternalNode::ValueOnIterator::getOrigin() doesn't compile
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 774
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
### Environment
**Operating System:** Ubuntu 20.04 (WSL2 in Windows 10)
**Version / Commit SHA:** openvdb 10.0.0
**Other:** Open-source OneAPI (clang)
### Describe the bug
InternalNode::ValueOnIterator::getOrigin() won't compile.
"no viable conversion from returned value of type 'void' to function return type 'CoordType' (aka 'nanovdb::Coord')"
getOrigin() is meant to return a CoordType, but mParent->localToGlobalCoord() returns void.
Same issue will likely happen for ValueIterator.
The compiler is separately throwing an error about not being able to bind a temporary of type uint32_t (from BaseT::pos()) to an lvalue reference of type Coord (the Coord& input in localToGlobalCoord())
### To Reproduce
Steps to reproduce the behavior:
1. Call ValueOnIterator::getOrigin() (from the unit test even I'm guessing)
### Expected behavior
getOrigin() should return a Coord
### Additional context
These getOrigin() functions probably meant to call offsetToGlobalCoord() perhaps?
Contributor guide
Research direction
Start by locating NanoVDB's InternalNode::ValueOnIterator::getOrigin() and the corresponding ValueIterator implementation mentioned in the report. Inspect how localToGlobalCoord(), offsetToGlobalCoord(), and BaseT::pos() are used, then reproduce the reported compile errors with the relevant unit test. Done means both getOrigin() functions compile and return a Coord as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100