@@ -237,14 +237,14 @@ template <typename T> struct ConversionTraits
237237 using WriteHandle = AttributeWriteHandle<T, UnknownCodec>;
238238 static T zero () { return zeroVal<T>(); }
239239 template <typename LeafT>
240- static typename Handle::Ptr handleFromLeaf (LeafT& leaf, Index index) {
240+ static std::unique_ptr<Handle> handleFromLeaf (const LeafT& leaf, const Index index) {
241241 const AttributeArray& array = leaf.constAttributeArray (index);
242- return Handle::create (array);
242+ return std::make_unique<Handle> (array);
243243 }
244244 template <typename LeafT>
245- static typename WriteHandle::Ptr writeHandleFromLeaf (LeafT& leaf, Index index) {
245+ static std::unique_ptr<WriteHandle> writeHandleFromLeaf (LeafT& leaf, const Index index) {
246246 AttributeArray& array = leaf.attributeArray (index);
247- return WriteHandle::create (array);
247+ return std::make_unique<WriteHandle> (array);
248248 }
249249}; // ConversionTraits
250250template <> struct ConversionTraits <openvdb::Name>
@@ -253,16 +253,16 @@ template <> struct ConversionTraits<openvdb::Name>
253253 using WriteHandle = StringAttributeWriteHandle;
254254 static openvdb::Name zero () { return " " ; }
255255 template <typename LeafT>
256- static typename Handle::Ptr handleFromLeaf (LeafT& leaf, Index index) {
256+ static std::unique_ptr<Handle> handleFromLeaf (const LeafT& leaf, const Index index) {
257257 const AttributeArray& array = leaf.constAttributeArray (index);
258258 const AttributeSet::Descriptor& descriptor = leaf.attributeSet ().descriptor ();
259- return Handle::create (array, descriptor.getMetadata ());
259+ return std::make_unique<Handle> (array, descriptor.getMetadata ());
260260 }
261261 template <typename LeafT>
262- static typename WriteHandle::Ptr writeHandleFromLeaf (LeafT& leaf, Index index) {
262+ static std::unique_ptr<WriteHandle> writeHandleFromLeaf (LeafT& leaf, const Index index) {
263263 AttributeArray& array = leaf.attributeArray (index);
264264 const AttributeSet::Descriptor& descriptor = leaf.attributeSet ().descriptor ();
265- return WriteHandle::create (array, descriptor.getMetadata ());
265+ return std::make_unique<WriteHandle> (array, descriptor.getMetadata ());
266266 }
267267}; // ConversionTraits<openvdb::Name>
268268
@@ -298,7 +298,7 @@ struct PopulateAttributeOp {
298298
299299 if (!pointIndexLeaf) continue ;
300300
301- typename HandleT::Ptr attributeWriteHandle =
301+ auto attributeWriteHandle =
302302 ConversionTraits<ValueType>::writeHandleFromLeaf (*leaf, static_cast <Index>(mIndex ));
303303
304304 Index64 index = 0 ;
@@ -474,7 +474,7 @@ struct ConvertPointDataGridAttributeOp {
474474
475475 if (leaf.pos () > 0 ) offset += mPointOffsets [leaf.pos () - 1 ];
476476
477- typename SourceHandleT::Ptr handle = ConversionTraits<ValueType>::handleFromLeaf (
477+ auto handle = ConversionTraits<ValueType>::handleFromLeaf (
478478 *leaf, static_cast <Index>(mIndex ));
479479
480480 if (mFilter .state () == index::ALL) {
0 commit comments