Skip to content

Commit

Permalink
Merge pull request AcademySoftwareFoundation#74 from khang/fix-shared…
Browse files Browse the repository at this point in the history
…-ptrs

Change SharedPtr to shared_ptr.
  • Loading branch information
Dan Bailey committed Nov 2, 2016
2 parents 55f3291 + 9c7509d commit 777c793
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions openvdb_points/tools/AttributeArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ class AttributeArray
};
#endif

using Ptr = SharedPtr<AttributeArray>;
using ConstPtr = SharedPtr<const AttributeArray>;
using Ptr = std::shared_ptr<AttributeArray>;
using ConstPtr = std::shared_ptr<const AttributeArray>;

using FactoryMethod = Ptr (*)(size_t, Index);

Expand Down Expand Up @@ -434,8 +434,8 @@ template<typename ValueType_, typename Codec_ = NullCodec>
class TypedAttributeArray: public AttributeArray
{
public:
using Ptr = SharedPtr<TypedAttributeArray>;
using ConstPtr = SharedPtr<const TypedAttributeArray>;
using Ptr = std::shared_ptr<TypedAttributeArray>;
using ConstPtr = std::shared_ptr<const TypedAttributeArray>;

using ValueType = ValueType_;
using Codec = Codec_;
Expand Down Expand Up @@ -605,7 +605,7 @@ class AttributeHandle
{
public:
using Handle = AttributeHandle<ValueType, CodecType, Strided, Interleaved>;
using Ptr = SharedPtr<Handle>;
using Ptr = std::shared_ptr<Handle>;
using UniquePtr = std::unique_ptr<Handle>;

protected:
Expand Down Expand Up @@ -669,7 +669,7 @@ class AttributeWriteHandle : public AttributeHandle<ValueType, CodecType, Stride
{
public:
using Handle = AttributeWriteHandle<ValueType, CodecType, Strided, Interleaved>;
using Ptr = SharedPtr<Handle>;
using Ptr = std::shared_ptr<Handle>;
using ScopedPtr = std::unique_ptr<Handle>;

static Ptr create(AttributeArray& array, const bool expand = true);
Expand Down
5 changes: 2 additions & 3 deletions openvdb_points/tools/AttributeSet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ namespace {

AttributeSet::AttributeSet()
: mDescr(new Descriptor())
, mAttrs()
{
}

Expand Down Expand Up @@ -136,8 +135,8 @@ size_t
AttributeSet::memUsage() const
{
size_t bytes = sizeof(*this) + mDescr->memUsage();
for (size_t n = 0, N = mAttrs.size(); n < N; ++n) {
bytes += mAttrs[n]->memUsage();
for (const auto& attr : mAttrs) {
bytes += attr->memUsage();
}
return bytes;
}
Expand Down

0 comments on commit 777c793

Please sign in to comment.