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)
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)
1071 while (NextArrayValue()) { 1071 while (NextArrayValue()) {
1072 RAPIDJSON_ASSERT(PeekType() == kObjectType); 1072 RAPIDJSON_ASSERT(PeekType() == kObjectType);
1073 if (!obj.mAnimInfo) 1073 if (!obj.mAnimInfo)
1074 obj.mAnimInfo.reset(new LottieAnimInfo<LottieShape>()); 1074 obj.mAnimInfo = std::make_shared<LottieAnimInfo<LottieShape>>();
1075 parseKeyFrame(*obj.mAnimInfo.get()); 1075 parseKeyFrame(*obj.mAnimInfo.get());
1076 } 1076 }
1077 } else { 1077 } else {
@@ -1103,7 +1103,7 @@ void LottieParser::parseProperty(LottieAnimatable<T> &obj)
1103 /* property with keyframe info*/ 1103 /* property with keyframe info*/
1104 if (PeekType() == kObjectType) { 1104 if (PeekType() == kObjectType) {
1105 if (!obj.mAnimInfo) 1105 if (!obj.mAnimInfo)
1106 obj.mAnimInfo.reset(new LottieAnimInfo<T>()); 1106 obj.mAnimInfo = std::make_shared<LottieAnimInfo<T>>();
1107 parseKeyFrame(*obj.mAnimInfo.get()); 1107 parseKeyFrame(*obj.mAnimInfo.get());
1108 } else { 1108 } else {
1109 /* Read before modifying. 1109 /* Read before modifying.