From 485f55f99b26b247c6557569d962122e3f3153dc Mon Sep 17 00:00:00 2001 From: "sub.mohanty@samsung.com" Date: Sun, 29 Jul 2018 19:53:44 +0900 Subject: [PATCH] lottie/model: unique pointer will do the job. Change-Id: If421eb50bfbb529dece4d42fce1b71ff70574694 --- src/lottie/lottiemodel.h | 2 +- src/lottie/lottieparser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h index d20d554..fa9e9d5 100644 --- a/src/lottie/lottiemodel.h +++ b/src/lottie/lottiemodel.h @@ -238,7 +238,7 @@ public: public: T mValue; int mPropertyIndex; /* "ix" */ - std::shared_ptr> mAnimInfo; + std::unique_ptr> mAnimInfo; }; enum class LottieBlendMode diff --git a/src/lottie/lottieparser.cpp b/src/lottie/lottieparser.cpp index cf296c8..3eede42 100644 --- a/src/lottie/lottieparser.cpp +++ b/src/lottie/lottieparser.cpp @@ -1715,7 +1715,7 @@ LottieParserImpl::parseShapeProperty(LOTAnimatable &obj) while (NextArrayValue()) { RAPIDJSON_ASSERT(PeekType() == kObjectType); if (!obj.mAnimInfo) - obj.mAnimInfo = std::make_shared>(); + obj.mAnimInfo = std::make_unique>(); parseKeyFrame(*obj.mAnimInfo.get()); } } else { @@ -1749,7 +1749,7 @@ void LottieParserImpl::parseProperty(LOTAnimatable &obj) /* property with keyframe info*/ if (PeekType() == kObjectType) { if (!obj.mAnimInfo) - obj.mAnimInfo = std::make_shared>(); + obj.mAnimInfo = std::make_unique>(); parseKeyFrame(*obj.mAnimInfo.get()); } else { /* Read before modifying. -- 2.7.4