diff --git a/pxr/usd/usd/crateFile.h b/pxr/usd/usd/crateFile.h index 399367e6e0..344f357220 100644 --- a/pxr/usd/usd/crateFile.h +++ b/pxr/usd/usd/crateFile.h @@ -349,12 +349,15 @@ class CrateFile bool operator!=(ZeroCopySource const &other) const { return !(*this == other); } - friend size_t tbb_hasher(ZeroCopySource const &z) { - return TfHash::Combine( - reinterpret_cast(z._addr), - z._numBytes - ); - } + + struct Hash { + inline size_t operator()(const ZeroCopySource& z) const { + return TfHash::Combine( + reinterpret_cast(z._addr), + z._numBytes + ); + } + }; // Return true if the refcount is nonzero. bool IsInUse() const { return _refCount; } @@ -422,7 +425,7 @@ class CrateFile ArchConstFileMapping _mapping; char const *_start; int64_t _length; - tbb::concurrent_unordered_set _outstandingRanges; + tbb::concurrent_unordered_set _outstandingRanges; }; public: