diff --git a/inc/thorvg.h b/inc/thorvg.h index 576f94a4..0dabc0dd 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -1894,7 +1894,7 @@ public: * @brief The cast() function is a utility function used to cast a 'Paint' to type 'T'. * @since 0.11 */ -template +template std::unique_ptr cast(Paint* paint) { return std::unique_ptr(static_cast(paint)); @@ -1905,7 +1905,7 @@ std::unique_ptr cast(Paint* paint) * @brief The cast() function is a utility function used to cast a 'Fill' to type 'T'. * @since 0.11 */ -template +template std::unique_ptr cast(Fill* fill) { return std::unique_ptr(static_cast(fill)); diff --git a/src/bindings/wasm/tvgWasm.cpp b/src/bindings/wasm/tvgWasm.cpp index a9e2c662..9b849005 100644 --- a/src/bindings/wasm/tvgWasm.cpp +++ b/src/bindings/wasm/tvgWasm.cpp @@ -88,7 +88,7 @@ public: resize(width, height); - if (canvas->push(cast(animation->picture())) != Result::Success) { + if (canvas->push(cast(animation->picture())) != Result::Success) { errorMsg = "push() fail"; return false; } diff --git a/src/examples/Animation.cpp b/src/examples/Animation.cpp index 6a6fa6e0..ce5ad58e 100644 --- a/src/examples/Animation.cpp +++ b/src/examples/Animation.cpp @@ -77,7 +77,7 @@ void tvgDrawCmds(tvg::Canvas* canvas) picture->scale(scale); picture->translate(shiftX, shiftY); - canvas->push(tvg::cast(picture)); + canvas->push(tvg::cast(picture)); //Run animation loop elm_transit_duration_set(transit, animation->duration()); diff --git a/src/examples/Lottie.cpp b/src/examples/Lottie.cpp index e846d753..9e7210ba 100644 --- a/src/examples/Lottie.cpp +++ b/src/examples/Lottie.cpp @@ -125,7 +125,7 @@ void tvgDrawCmds(tvg::Canvas* canvas) elm_transit_repeat_times_set(transit, -1); elm_transit_go(transit); - canvas->push(tvg::cast(animation->picture())); + canvas->push(tvg::cast(animation->picture())); } } diff --git a/src/loaders/lottie/tvgLottieBuilder.cpp b/src/loaders/lottie/tvgLottieBuilder.cpp index a64b66e9..f36cd6e5 100644 --- a/src/loaders/lottie/tvgLottieBuilder.cpp +++ b/src/loaders/lottie/tvgLottieBuilder.cpp @@ -353,11 +353,11 @@ static void _repeat(LottieGroup* parent, int32_t frameNo, unique_ptr path //push repeat shapes in order. if (repeater->inorder) { for (auto shape = shapes.data; shape < shapes.end(); ++shape) { - parent->scene->push(cast(*shape)); + parent->scene->push(cast(*shape)); } } else { for (auto shape = shapes.end() - 1; shape >= shapes.data; --shape) { - parent->scene->push(cast(*shape)); + parent->scene->push(cast(*shape)); } } } @@ -802,7 +802,7 @@ static void _updatePrecomp(LottieLayer* precomp, int32_t frameNo) clipper->appendRect(0, 0, static_cast(precomp->w), static_cast(precomp->h)); clipper->transform(precomp->cache.matrix); cscene->composite(std::move(clipper), CompositeMethod::ClipPath); - cscene->push(cast(precomp->scene)); + cscene->push(cast(precomp->scene)); precomp->scene = cscene.release(); } } @@ -913,7 +913,7 @@ static void _updateLayer(LottieLayer* root, LottieLayer* layer, int32_t frameNo) } //the given matte source was composited by the target earlier. - if (!layer->matteSrc) root->scene->push(cast(layer->scene)); + if (!layer->matteSrc) root->scene->push(cast(layer->scene)); }