added COVAR_ and SORT_ enums to core.hpp; fixed many, many VS2005, VS2010 and MinGW (GCC 4.5.2) warnings

This commit is contained in:
Vadim Pisarevsky
2011-07-19 12:27:07 +00:00
parent 6bb1c07fd4
commit ff5e97c8e4
48 changed files with 443 additions and 385 deletions

View File

@@ -559,7 +559,8 @@ static void inRange(const Mat& src, const Mat& lb, const Mat& rb, Mat& dst)
NAryMatIterator it(arrays, planes);
size_t total = planes[0].total();
int i, nplanes = it.nplanes, depth = src.depth(), cn = src.channels();
size_t i, nplanes = it.nplanes;
int depth = src.depth(), cn = src.channels();
for( i = 0; i < nplanes; i++, ++it )
{
@@ -606,7 +607,8 @@ static void inRangeS(const Mat& src, const Scalar& lb, const Scalar& rb, Mat& ds
NAryMatIterator it(arrays, planes);
size_t total = planes[0].total();
int i, nplanes = it.nplanes, depth = src.depth(), cn = src.channels();
size_t i, nplanes = it.nplanes;
int depth = src.depth(), cn = src.channels();
double lbuf[4], rbuf[4];
int wtype = CV_MAKETYPE(depth <= CV_32S ? CV_32S : depth, cn);
scalarToRawData(lb, lbuf, wtype, cn);
@@ -900,7 +902,8 @@ static void exp(const Mat& src, Mat& dst)
NAryMatIterator it(arrays, planes);
size_t j, total = planes[0].total()*src.channels();
int i, nplanes = it.nplanes, depth = src.depth();
size_t i, nplanes = it.nplanes;
int depth = src.depth();
for( i = 0; i < nplanes; i++, ++it )
{
@@ -928,7 +931,8 @@ static void log(const Mat& src, Mat& dst)
NAryMatIterator it(arrays, planes);
size_t j, total = planes[0].total()*src.channels();
int i, nplanes = it.nplanes, depth = src.depth();
size_t i, nplanes = it.nplanes;
int depth = src.depth();
for( i = 0; i < nplanes; i++, ++it )
{
@@ -1017,7 +1021,8 @@ static void cartToPolar(const Mat& mx, const Mat& my, Mat& mmag, Mat& mangle, bo
NAryMatIterator it(arrays, planes);
size_t j, total = planes[0].total();
int i, nplanes = it.nplanes, depth = mx.depth();
size_t i, nplanes = it.nplanes;
int depth = mx.depth();
double scale = angleInDegrees ? 180/CV_PI : 1;
for( i = 0; i < nplanes; i++, ++it )
@@ -1260,8 +1265,8 @@ struct MinMaxLocOp : public BaseElemWiseOp
void saveOutput(const vector<int>& minidx, const vector<int>& maxidx,
double minval, double maxval, Mat& dst)
{
size_t i, ndims = minidx.size();
dst.create(1, (int)(ndims*2 + 2), CV_64FC1);
int i, ndims = (int)minidx.size();
dst.create(1, ndims*2 + 2, CV_64FC1);
for( i = 0; i < ndims; i++ )
{

View File

@@ -170,9 +170,9 @@ static void DCT_1D( const Mat& _src, Mat& _dst, int flags, const Mat& _wave=Mat(
w = wave.ptr<double>();
if( !_src.isContinuous() )
srcstep = _src.step/_src.elemSize();
srcstep = (int)(_src.step/_src.elemSize());
if( !_dst.isContinuous() )
dststep = _dst.step/_dst.elemSize();
dststep = (int)(_dst.step/_dst.elemSize());
if( _src.type() == CV_32FC1 )
{
@@ -279,10 +279,10 @@ static void convertFromCCS( const Mat& _src0, const Mat& _src1, Mat& _dst, int f
int srcstep = cn, dststep = 1;
if( !_dst.isContinuous() )
dststep = _dst.step/_dst.elemSize();
dststep = (int)(_dst.step/_dst.elemSize());
if( !_src0.isContinuous() )
srcstep = _src0.step/_src0.elemSize1();
srcstep = (int)(_src0.step/_src0.elemSize1());
if( _dst.depth() == CV_32F )
{

View File

@@ -1954,7 +1954,7 @@ void Core_SVDTest::prepare_to_validation( int /*test_case_idx*/ )
}
w = &test_mat[TEMP][0];
step = w->rows == 1 ? 1 : w->step1();
step = w->rows == 1 ? 1 : (int)w->step1();
for( i = 0; i < min_size; i++ )
{
double normval = 0, aii;