From b81dcbdf2a0db0770893630d5cf38c2a3b3d5041 Mon Sep 17 00:00:00 2001 From: jaco Date: Wed, 13 Aug 2014 17:59:16 +0200 Subject: [PATCH] #pragma warning4127 fixation modified Now use cleaner approach: #pragma warning( push ) #pragma warning( disable: ThatWarning ) //code with ThatWarning here #pragma warning( pop ) --- modules/core/include/opencv2/core/cvstd.inl.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/core/include/opencv2/core/cvstd.inl.hpp b/modules/core/include/opencv2/core/cvstd.inl.hpp index 7e4c387574..f43798e16d 100644 --- a/modules/core/include/opencv2/core/cvstd.inl.hpp +++ b/modules/core/include/opencv2/core/cvstd.inl.hpp @@ -49,10 +49,6 @@ # include #endif -#ifdef _MSC_VER -#pragma warning( disable: 4127 ) -#endif - namespace cv { #ifndef OPENCV_NOSTL @@ -224,7 +220,10 @@ std::ostream& operator << (std::ostream& out, const Vec<_Tp, n>& vec) { out << "["; +#pragma warning( push ) +#pragma warning( disable: 4127 ) if(Vec<_Tp, n>::depth < CV_32F) +#pragma warning( pop ) { for (int i = 0; i < n - 1; ++i) { out << (int)vec[i] << ", ";