Skip to content

Commit 9ae369e

Browse files
authored
Merge pull request #1751 from NBickford-NV/nbickford/faster-resetBackground
Add early-exit optimization for LeafNode::resetBackground()
2 parents 1b0fa91 + b3985c1 commit 9ae369e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openvdb/openvdb/tree/LeafNode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,7 @@ LeafNode<T, Log2Dim>::resetBackground(const ValueType& oldBackground,
16111611
const ValueType& newBackground)
16121612
{
16131613
if (!this->allocate()) return;
1614+
if (math::isExactlyEqual(oldBackground, newBackground)) return;
16141615

16151616
typename NodeMaskType::OffIterator iter;
16161617
// For all inactive values...

0 commit comments

Comments
 (0)