Skip to content

Commit

Permalink
Merge pull request #1628 from jdumas/jdumas/cpp20
Browse files Browse the repository at this point in the history
Fix C++20 compatibility by removing deprecated shared_ptr::unique()
  • Loading branch information
danrbailey authored Sep 26, 2023
2 parents 5a0519d + e31140c commit d41e3a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openvdb/openvdb/points/AttributeSet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ AttributeSet::isShared(size_t pos) const
{
assert(pos != INVALID_POS);
assert(pos < mAttrs.size());
return !mAttrs[pos].unique();
// Warning: In multithreaded environment, the value returned by use_count is approximate.
return mAttrs[pos].use_count() != 1;
}


Expand Down

0 comments on commit d41e3a5

Please sign in to comment.