From 53bfdc318ae40d1de3ced88ef91ecd911aaee47a Mon Sep 17 00:00:00 2001 From: Orest Chura Date: Tue, 28 Jul 2020 13:25:56 +0300 Subject: [PATCH] Merge pull request #17896 from OrestChura:oc/fix_kw_videotests * - fix numeric overflow due to incorrect type casting - remove unnecessary default constructor * Drop the cast --- modules/gapi/test/common/gapi_video_tests_common.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/gapi/test/common/gapi_video_tests_common.hpp b/modules/gapi/test/common/gapi_video_tests_common.hpp index 19efef054c..c12a817b2e 100644 --- a/modules/gapi/test/common/gapi_video_tests_common.hpp +++ b/modules/gapi/test/common/gapi_video_tests_common.hpp @@ -43,7 +43,7 @@ inline void initTrackingPointsArray(std::vector& points, int width, points.clear(); GAPI_Assert((nPointsX >= 0) && (nPointsY) >= 0); - points.reserve(static_cast(nPointsX * nPointsY)); + points.reserve(nPointsX * nPointsY); for (int x = stepX / 2; x < width; x += stepX) { @@ -80,9 +80,7 @@ struct OptFlowLKTestOutput struct BuildOpticalFlowPyramidTestParams { - BuildOpticalFlowPyramidTestParams(): fileName(""), winSize(-1), maxLevel(-1), - withDerivatives(false), pyrBorder(-1), - derivBorder(-1), tryReuseInputImage(false) { } + BuildOpticalFlowPyramidTestParams() = default; BuildOpticalFlowPyramidTestParams(const std::string& name, int winSz, int maxLvl, bool withDeriv, int pBorder, int dBorder,