Skip to content

Commit

Permalink
Replace boost::intrusive_ptr with TfIntrusiveTrackingPtr in `Usd_…
Browse files Browse the repository at this point in the history
…CrateFile`
  • Loading branch information
nvmkuruc committed Jan 3, 2024
1 parent 49d6d18 commit 3cb3f78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pxr/usd/usd/crateFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/pxrTslRobinMap/robin_map.h"
#include "pxr/base/tf/token.h"
#include "pxr/base/tf/trackingPtr.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/vt/value.h"
#include "pxr/base/work/dispatcher.h"
Expand All @@ -44,8 +45,6 @@
#include "pxr/usd/sdf/path.h"
#include "pxr/usd/sdf/types.h"

#include <boost/intrusive_ptr.hpp>

#include <tbb/concurrent_unordered_set.h>
#include <tbb/spin_rw_mutex.h>

Expand Down Expand Up @@ -403,7 +402,7 @@ class CrateFile
// other code reading/writing the file.)
void _DetachReferencedRanges();

// This class is managed by a combination of boost::intrusive_ptr
// This class is managed by a combination of TfIntrusiveTrackingPtr
// and manual reference counting -- see explicit calls to
// intrusive_ptr_add_ref/release in the .cpp file.
friend inline void
Expand Down Expand Up @@ -432,7 +431,8 @@ class CrateFile
// Construct with new mapping.
explicit _FileMapping(ArchConstFileMapping &&mapping,
int64_t offset=0, int64_t length=-1) noexcept
: _impl(new _Impl(std::move(mapping), offset, length)) {}
: _impl(TfTrackingPtrRetainTag,
new _Impl(std::move(mapping), offset, length)) {}

_FileMapping(_FileMapping &&other) noexcept
: _impl(std::move(other._impl)) {
Expand Down Expand Up @@ -477,7 +477,7 @@ class CrateFile
}

private:
boost::intrusive_ptr<_Impl> _impl;
TfIntrusiveTrackingPtr<_Impl> _impl;
};

////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 3cb3f78

Please sign in to comment.