From 2c37191584b18a532cd01e7986fc5f53ebeea80d Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 2 Jun 2021 16:38:21 +0900 Subject: [PATCH] api: --inproper const syntax. compoiste() requires internal data change, its api syntax should not contain "const" though this changes the api spec, but won't affect build break since it allows wider usage. @API Modification from: Result Paint::composite(std::unique_ptr target, CompositeMethod method) const noexcept to: Result Paint::composite(std::unique_ptr target, CompositeMethod method) noexcept --- inc/thorvg.h | 2 +- src/lib/tvgPaint.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/thorvg.h b/inc/thorvg.h index 24a9d5a5..1d95ee53 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -256,7 +256,7 @@ public: * @return Result::Success when succeed, Result::InvalidArguments otherwise. * */ - Result composite(std::unique_ptr target, CompositeMethod method) const noexcept; + Result composite(std::unique_ptr target, CompositeMethod method) noexcept; /** * @brief Gets the bounding box of the paint object before any transformation. diff --git a/src/lib/tvgPaint.cpp b/src/lib/tvgPaint.cpp index 987ddaee..a32ca43f 100644 --- a/src/lib/tvgPaint.cpp +++ b/src/lib/tvgPaint.cpp @@ -295,7 +295,7 @@ Paint* Paint::duplicate() const noexcept } -Result Paint::composite(std::unique_ptr target, CompositeMethod method) const noexcept +Result Paint::composite(std::unique_ptr target, CompositeMethod method) noexcept { if (pImpl->composite(target.release(), method)) return Result::Success; return Result::InvalidArguments;