From: Dan Ben-Yosef Date: Mon, 15 Feb 2021 19:58:37 +0000 (+0200) Subject: Merge pull request #19525 from danbey:Fix-cppcheck-error-in-carotete-lib X-Git-Tag: accepted/tizen/unified/20220125.121719~1^2~1^2~160 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0445295bd4414a548462d7aed735985c12415b1;p=platform%2Fupstream%2Fopencv.git Merge pull request #19525 from danbey:Fix-cppcheck-error-in-carotete-lib * Reduce if statement as it has the same expression on both sides of '&&' If statement has the same expression on both sides so this can be reduce Signed-off-by: Dan Ben Yosef * The if statement is to check width and height --- diff --git a/3rdparty/carotene/src/resize.cpp b/3rdparty/carotene/src/resize.cpp index 4920557..aa5b756 100644 --- a/3rdparty/carotene/src/resize.cpp +++ b/3rdparty/carotene/src/resize.cpp @@ -758,7 +758,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize, } else if (channels == 3) { - if ((wr == 2.0f) && (wr == 2.0f)) + if ((wr == 2.0f) && (hr == 2.0f)) { #ifndef __ANDROID__ size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) * 3 : 0;