fixed some GCC 4.4 warnings

This commit is contained in:
Vadim Pisarevsky
2010-11-20 12:05:28 +00:00
parent 752c4bc48b
commit de4f1aeb06
7 changed files with 17 additions and 20 deletions

View File

@@ -1454,8 +1454,7 @@ void SVD::backSubst( const Mat& w, const Mat& u, const Mat& vt, const Mat& rhs,
AutoBuffer<double> buffer(nb);
CV_Assert( u.data && vt.data && w.data );
if( rhs.data )
CV_Assert( rhs.type() == type && rhs.rows == m );
CV_Assert( rhs.data == 0 || (rhs.type() == type && rhs.rows == m) );
dst.create( n, nb, type );
if( type == CV_32F )

View File

@@ -685,8 +685,11 @@ void extractImageCOI(const CvArr* arr, Mat& ch, int coi)
{
Mat mat = cvarrToMat(arr, false, true, 1);
ch.create(mat.dims, mat.size, mat.depth());
if(coi < 0)
CV_Assert( CV_IS_IMAGE(arr) && (coi = cvGetImageCOI((const IplImage*)arr)-1) >= 0 );
if(coi < 0)
{
CV_Assert( CV_IS_IMAGE(arr) );
coi = cvGetImageCOI((const IplImage*)arr)-1;
}
CV_Assert(0 <= coi && coi < mat.channels());
int _pairs[] = { coi, 0 };
mixChannels( &mat, 1, &ch, 1, _pairs, 1 );
@@ -695,8 +698,11 @@ void extractImageCOI(const CvArr* arr, Mat& ch, int coi)
void insertImageCOI(const Mat& ch, CvArr* arr, int coi)
{
Mat mat = cvarrToMat(arr, false, true, 1);
if(coi < 0)
CV_Assert( CV_IS_IMAGE(arr) && (coi = cvGetImageCOI((const IplImage*)arr)-1) >= 0 );
if(coi < 0)
{
CV_Assert( CV_IS_IMAGE(arr) );
coi = cvGetImageCOI((const IplImage*)arr)-1;
}
CV_Assert(ch.size == mat.size && ch.depth() == mat.depth() && 0 <= coi && coi < mat.channels());
int _pairs[] = { 0, coi };
mixChannels( &ch, 1, &mat, 1, _pairs, 1 );