From e79e81c6cd77865266f710561af403462840b26a Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 30 Jan 2013 13:24:49 +0400 Subject: [PATCH] Fix Windows build warnings --- modules/calib3d/test/test_modelest.cpp | 2 +- modules/ts/src/ts.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/calib3d/test/test_modelest.cpp b/modules/calib3d/test/test_modelest.cpp index 91bf4b092f..e27c12d49c 100644 --- a/modules/calib3d/test/test_modelest.cpp +++ b/modules/calib3d/test/test_modelest.cpp @@ -159,7 +159,7 @@ void CV_ModelEstimator2_Test::fill_array( int test_case_idx, int i, int j, Mat& Point2d tangentVector_1 = arr.at(endPointIndex) - arr.at(startPointIndex); Point2d tangentVector_2 = arr.at(testPointIndex) - arr.at(startPointIndex); - const float eps = 1e-4; + const float eps = 1e-4f; //TODO: perhaps it is better to normalize the cross product by norms of the tangent vectors if (fabs(tangentVector_1.cross(tangentVector_2)) < eps) { diff --git a/modules/ts/src/ts.cpp b/modules/ts/src/ts.cpp index 4ae9e7ea4d..7ce37752db 100644 --- a/modules/ts/src/ts.cpp +++ b/modules/ts/src/ts.cpp @@ -47,8 +47,12 @@ #include #if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64 #include -#define NOMINMAX + #include +#undef small +#undef min +#undef max +#undef abs #ifdef _MSC_VER #include