From d0dc9142ec02c355770ac954529ae5aa0ac3b9c4 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Sun, 25 Apr 2021 23:40:03 +0200 Subject: [PATCH] common paint: changed result in composite API A possible error is due to erroneous arguments, so InvalidArgument is return instead of InsufficientCondition --- src/lib/tvgPaint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/tvgPaint.cpp b/src/lib/tvgPaint.cpp index 9b0aba77..b40b5290 100644 --- a/src/lib/tvgPaint.cpp +++ b/src/lib/tvgPaint.cpp @@ -298,7 +298,7 @@ Paint* Paint::duplicate() const noexcept Result Paint::composite(std::unique_ptr target, CompositeMethod method) const noexcept { if (pImpl->composite(target.release(), method)) return Result::Success; - return Result::InsufficientCondition; + return Result::InvalidArguments; } @@ -316,4 +316,4 @@ Result Paint::opacity(uint8_t o) noexcept uint8_t Paint::opacity() const noexcept { return pImpl->opacity; -} \ No newline at end of file +}