summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2017-12-20 10:11:55 +0900
committersubhransu mohanty <sub.mohanty@samsung.com>2018-04-12 13:51:52 +0900
commit7a58aa46a91efb40e2868022626efd645a8cd357 (patch)
treeab677baa1cfd629ed368cf5827e6523a19ddd3b6
parentda02dc48e9706ee22d991120354d793d322c6faf (diff)
downloadefl-7a58aa46a91efb40e2868022626efd645a8cd357.tar.gz
lottie: use make_shared instead of reset() for shared_ptr.
-rw-r--r--ssg/src/lottie/lottieparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssg/src/lottie/lottieparser.cpp b/ssg/src/lottie/lottieparser.cpp
index 443f287d25..6307692088 100644
--- a/ssg/src/lottie/lottieparser.cpp
+++ b/ssg/src/lottie/lottieparser.cpp
@@ -1071,7 +1071,7 @@ LottieParser::parseShapeProperty(LottieAnimatable<LottieShape> &obj)
while (NextArrayValue()) {
RAPIDJSON_ASSERT(PeekType() == kObjectType);
if (!obj.mAnimInfo)
- obj.mAnimInfo.reset(new LottieAnimInfo<LottieShape>());
+ obj.mAnimInfo = std::make_shared<LottieAnimInfo<LottieShape>>();
parseKeyFrame(*obj.mAnimInfo.get());
}
} else {
@@ -1103,7 +1103,7 @@ void LottieParser::parseProperty(LottieAnimatable<T> &obj)
/* property with keyframe info*/
if (PeekType() == kObjectType) {
if (!obj.mAnimInfo)
- obj.mAnimInfo.reset(new LottieAnimInfo<T>());
+ obj.mAnimInfo = std::make_shared<LottieAnimInfo<T>>();
parseKeyFrame(*obj.mAnimInfo.get());
} else {
/* Read before modifying.