example:refactor to remove naked malloc and RAII warning
authorsubhransu mohanty <sub.mohanty@samsung.com>
Mon, 20 May 2019 04:10:43 +0000 (13:10 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 22 May 2019 04:02:24 +0000 (13:02 +0900)
Change-Id: Idab2ed2cd98fa4fbf127f5c49097c00b8d2111cf

example/lottie2gif.cpp

index 38ad9e8..ae9c58c 100644 (file)
@@ -72,7 +72,7 @@ public:
         auto player = rlottie::Animation::loadFromFile(fileName);
         if (!player) return help();
 
-        auto buffer = std::unique_ptr<uint32_t[]>(new uint32_t[w * h]);
+        auto buffer = std::make_unique<uint32_t[]>(w * h);
         size_t frameCount = player->totalFrame();
 
         GifBuilder builder(baseName.data(), w, h);