Fixed tests broken by r8708

This commit is contained in:
Andrey Kamaev 2012-06-22 08:36:29 +00:00
parent 2984fa751e
commit 511d09f587

View File

@ -1129,26 +1129,26 @@ norm_(const _Tp* src, size_t total, int cn, int normType, double startval, const
{ {
if( !mask ) if( !mask )
for( i = 0; i < total; i++ ) for( i = 0; i < total; i++ )
result = std::max(result, (double)std::abs(int(src[i]))); result = std::max(result, (double)std::abs(0+src[i]));// trick with 0 used to quiet gcc warning
else else
for( int c = 0; c < cn; c++ ) for( int c = 0; c < cn; c++ )
{ {
for( i = 0; i < total; i++ ) for( i = 0; i < total; i++ )
if( mask[i] ) if( mask[i] )
result = std::max(result, (double)std::abs(int(src[i*cn + c]))); result = std::max(result, (double)std::abs(0+src[i*cn + c]));
} }
} }
else if( normType == NORM_L1 ) else if( normType == NORM_L1 )
{ {
if( !mask ) if( !mask )
for( i = 0; i < total; i++ ) for( i = 0; i < total; i++ )
result += std::abs(int(src[i])); result += std::abs(0+src[i]);
else else
for( int c = 0; c < cn; c++ ) for( int c = 0; c < cn; c++ )
{ {
for( i = 0; i < total; i++ ) for( i = 0; i < total; i++ )
if( mask[i] ) if( mask[i] )
result += std::abs(int(src[i*cn + c])); result += std::abs(0+src[i*cn + c]);
} }
} }
else else