diff --git a/pxr/base/vt/value.h b/pxr/base/vt/value.h index 4492e3ce00..e694d78130 100644 --- a/pxr/base/vt/value.h +++ b/pxr/base/vt/value.h @@ -41,6 +41,7 @@ #include "pxr/base/tf/safeTypeCompare.h" #include "pxr/base/tf/stringUtils.h" #include "pxr/base/tf/tf.h" +#include "pxr/base/tf/trackingPtr.h" #include "pxr/base/tf/type.h" #include "pxr/base/vt/api.h" @@ -49,8 +50,6 @@ #include "pxr/base/vt/traits.h" #include "pxr/base/vt/types.h" -#include - #include #include #include @@ -764,30 +763,30 @@ class VtValue //////////////////////////////////////////////////////////////////////// // Remote-storage type info implementation. The container is an - // intrusive_ptr to an object holder: _Counted. + // TfIntrusiveTrackingPtr to an object holder: _Counted. template struct _RemoteTypeInfo : _TypeInfoImpl< - T, // type - boost::intrusive_ptr<_Counted >, // container - _RemoteTypeInfo // CRTP + T, // type + TfIntrusiveTrackingPtr<_Counted>, // container + _RemoteTypeInfo // CRTP > { constexpr _RemoteTypeInfo() : _TypeInfoImpl< - T, boost::intrusive_ptr<_Counted>, _RemoteTypeInfo>() + T, TfIntrusiveTrackingPtr<_Counted>, _RemoteTypeInfo>() {} - typedef boost::intrusive_ptr<_Counted > Ptr; + using Ptr = TfIntrusiveTrackingPtr<_Counted>; // Get returns object stored in the pointed-to _Counted. static T &_GetMutableObj(Ptr &ptr) { if (!ptr->IsUnique()) - ptr.reset(new _Counted(ptr->Get())); + ptr = TfIntrusiveMakeTrackingPtr<_Counted>(ptr->Get()); return ptr->GetMutable(); } static T const &_GetObj(Ptr const &ptr) { return ptr->Get(); } // PlaceCopy() allocates a new _Counted with a copy of the object. static void _PlaceCopy(Ptr *dst, T const &src) { - new (dst) Ptr(new _Counted(src)); + new (dst) Ptr(TfTrackingPtrRetainTag, new _Counted(src)); } };