- make sure the code compiles with gcc 4.6
authorVincent Rabaud <no@email>
Fri, 22 Apr 2011 21:35:46 +0000 (21:35 +0000)
committerVincent Rabaud <no@email>
Fri, 22 Apr 2011 21:35:46 +0000 (21:35 +0000)
modules/core/src/stat.cpp

index b35d1cf..e514d80 100644 (file)
@@ -810,7 +810,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn)
     {
         len *= cn;
         for( int i = 0; i < len; i++ )
-            result = std::max(result, std::abs(src[i]));
+            result = std::max(result, ST(std::abs(src[i])));
     }
     else
     {
@@ -818,7 +818,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn)
             if( mask[i] )
             {
                 for( int k = 0; k < cn; k++ )
-                    result = std::max(result, std::abs(src[k]));
+                    result = std::max(result, ST(std::abs(src[k])));
             }
     }
     *_result = result;