Skip to content

Commit d41e3a5

Browse files
authored
Merge pull request #1628 from jdumas/jdumas/cpp20
Fix C++20 compatibility by removing deprecated shared_ptr::unique()
2 parents 5a0519d + e31140c commit d41e3a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openvdb/openvdb/points/AttributeSet.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ AttributeSet::isShared(size_t pos) const
280280
{
281281
assert(pos != INVALID_POS);
282282
assert(pos < mAttrs.size());
283-
return !mAttrs[pos].unique();
283+
// Warning: In multithreaded environment, the value returned by use_count is approximate.
284+
return mAttrs[pos].use_count() != 1;
284285
}
285286

286287

0 commit comments

Comments
 (0)