diff --git a/modules/calib3d/perf/perf_undistort.cpp b/modules/calib3d/perf/perf_undistort.cpp new file mode 100644 index 0000000000..e0ee113c2f --- /dev/null +++ b/modules/calib3d/perf/perf_undistort.cpp @@ -0,0 +1,21 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html +#include "perf_precomp.hpp" + +namespace opencv_test +{ +using namespace perf; + +PERF_TEST(Undistort, InitUndistortMap) +{ + Size size_w_h(512 + 3, 512); + Mat k(3, 3, CV_32FC1); + Mat d(1, 14, CV_64FC1); + Mat dst(size_w_h, CV_32FC2); + declare.in(k, d, WARMUP_RNG).out(dst); + TEST_CYCLE() initUndistortRectifyMap(k, d, noArray(), k, size_w_h, CV_32FC2, dst, noArray()); + SANITY_CHECK_NOTHING(); +} + +} // namespace diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 079f24c12a..7b81a17664 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -627,7 +627,7 @@ Cv64suf; \****************************************************************************************/ #ifndef CV_NOEXCEPT -# if defined(CV_CXX11) && (!defined(_MSC_VER) || _MSC_VER > 1800) /* MSVC 2015 and above */ +# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900/*MSVS 2015*/) # define CV_NOEXCEPT noexcept # endif #endif diff --git a/modules/core/test/test_ptr.cpp b/modules/core/test/test_ptr.cpp index ffeb443a1d..d3186afb43 100644 --- a/modules/core/test/test_ptr.cpp +++ b/modules/core/test/test_ptr.cpp @@ -43,10 +43,6 @@ namespace opencv_test { namespace { -#if defined __clang__ && defined __APPLE__ -#pragma clang diagnostic ignored "-Wself-assign-overloaded" // explicitly assigning value of variable of type '...' to itself (p1 = p1) -#endif - #ifdef GTEST_CAN_COMPARE_NULL # define EXPECT_NULL(ptr) EXPECT_EQ(NULL, ptr) #else @@ -161,7 +157,7 @@ TEST(Core_Ptr, assignment) { Ptr p1(new Reporter(&deleted1)); - p1 = p1; + p1 = *&p1; EXPECT_FALSE(deleted1); } diff --git a/modules/imgproc/perf/perf_warp.cpp b/modules/imgproc/perf/perf_warp.cpp index e31a687229..53bacc16d3 100644 --- a/modules/imgproc/perf/perf_warp.cpp +++ b/modules/imgproc/perf/perf_warp.cpp @@ -290,15 +290,4 @@ PERF_TEST(Transform, getPerspectiveTransform_1000) SANITY_CHECK_NOTHING(); } -PERF_TEST(Undistort, InitUndistortMap) -{ - Size size_w_h(512 + 3, 512); - Mat k(3, 3, CV_32FC1); - Mat d(1, 14, CV_64FC1); - Mat dst(size_w_h, CV_32FC2); - declare.in(k, d, WARMUP_RNG).out(dst); - TEST_CYCLE() initUndistortRectifyMap(k, d, noArray(), k, size_w_h, CV_32FC2, dst, noArray()); - SANITY_CHECK_NOTHING(); -} - } // namespace