Skip to content

Commit e31140c

Browse files
committed
Fix C++20 compatibility by removing deprecated shared_ptr::unique()
Signed-off-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
1 parent 9a57c7e commit e31140c

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)