Commit 6e15238d authored by Vincent Rabaud's avatar Vincent Rabaud

- make sure the code compiles with gcc 4.6

parent 1e69bd51
...@@ -810,7 +810,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn) ...@@ -810,7 +810,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn)
{ {
len *= cn; len *= cn;
for( int i = 0; i < len; i++ ) 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 else
{ {
...@@ -818,7 +818,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn) ...@@ -818,7 +818,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn)
if( mask[i] ) if( mask[i] )
{ {
for( int k = 0; k < cn; k++ ) 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; *_result = result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment