fixed many warnings from GCC 4.6.1

This commit is contained in:
Vadim Pisarevsky
2012-03-17 09:22:31 +00:00
parent 4985c1b632
commit 846e37ded5
34 changed files with 84 additions and 147 deletions

View File

@@ -399,8 +399,7 @@ Mat imdecode( InputArray _buf, int flags )
bool imencode( const string& ext, InputArray _image,
vector<uchar>& buf, const vector<int>& params )
{
Mat temp, image = _image.getMat();
const Mat* pimage = &image;
Mat image = _image.getMat();
int channels = image.channels();
CV_Assert( channels == 1 || channels == 3 || channels == 4 );
@@ -412,8 +411,9 @@ bool imencode( const string& ext, InputArray _image,
if( !encoder->isFormatSupported(image.depth()) )
{
CV_Assert( encoder->isFormatSupported(CV_8U) );
Mat temp;
image.convertTo(temp, CV_8U);
pimage = &temp;
image = temp;
}
bool code;