we can't use make_unique to create the animation object anymore because the constructor is private.
so used unique_ptr constructor instead.
Change-Id: I23b68c68d1b960085800365662ebb1cc676731cc
#endif
class AnimationImpl;
-class LOTNode;
+struct LOTNode;
namespace lottie {
*/
~Animation();
+private:
/**
* @brief default constructor
- *
- * @note user should never construct animation object.
- * they should call the one of the factory method instead.
- *
- * @see loadFromFile()
- * @see loadFromData()
*/
Animation();
-private:
+
std::unique_ptr<AnimationImpl> d;
};
LottieLoader loader;
if (loader.loadFromData(std::move(jsonData), key)) {
- auto animation = std::make_unique<Animation>();
+ auto animation = std::unique_ptr<Animation>(new Animation);
animation->d->init(loader.model());
return animation;
}
LottieLoader loader;
if (loader.load(path)) {
- auto animation = std::make_unique<Animation>();
+ auto animation = std::unique_ptr<Animation>(new Animation);
animation->d->init(loader.model());
return animation;
}