1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

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
+3 -3
View File
@@ -117,14 +117,14 @@ public:
free_nodes.pop_back();
}
node& n = nodes[ii];
int h1 = h.h1 % bins.size();
int h1 = (int)(h.h1 % bins.size());
n.i = i;
n.h2 = h.h2;
n.next = bins[h1];
bins[h1] = ii;
}
virtual void hash_remove(lsh_hash h, int /*l*/, int i) {
int h1 = h.h1 % bins.size();
int h1 = (int)(h.h1 % bins.size());
for (int ii = bins[h1], iin, iip = -1; ii != -1; iip = ii, ii = iin) {
iin = nodes[ii].next;
if (nodes[ii].h2 == h.h2 && nodes[ii].i == i) {
@@ -137,7 +137,7 @@ public:
}
}
virtual int hash_lookup(lsh_hash h, int /*l*/, int* ret_i, int ret_i_max) {
int h1 = h.h1 % bins.size();
int h1 = (int)(h.h1 % bins.size());
int k = 0;
for (int ii = bins[h1]; ii != -1 && k < ret_i_max; ii = nodes[ii].next)
if (nodes[ii].h2 == h.h2)
+1 -1
View File
@@ -388,7 +388,7 @@ void CV_ColorCvtBaseTest::convert_backward( const Mat& src, const Mat& dst, Mat&
else
{
int i, j, k;
int elem_size = src.elemSize(), elem_size1 = src.elemSize1();
int elem_size = (int)src.elemSize(), elem_size1 = (int)src.elemSize1();
int width_n = src.cols*elem_size;
for( i = 0; i < src.rows; i++ )
+6 -6
View File
@@ -224,7 +224,7 @@ int CV_MorphologyBaseTest::prepare_test_case( int test_case_idx )
{
eldata.resize(aperture_size.width*aperture_size.height);
uchar* src = test_mat[INPUT][1].data;
int srcstep = test_mat[INPUT][1].step;
int srcstep = (int)test_mat[INPUT][1].step;
int i, j, nonzero = 0;
for( i = 0; i < aperture_size.height; i++ )
@@ -901,7 +901,7 @@ static void test_medianFilter( const Mat& src, Mat& dst, int m )
vector<int> col_buf(m+1);
vector<median_pair> _buf0(m*m+1), _buf1(m*m+1);
median_pair *buf0 = &_buf0[0], *buf1 = &_buf1[0];
int step = src.step/src.elemSize();
int step = (int)(src.step/src.elemSize());
assert( src.rows == dst.rows + m - 1 && src.cols == dst.cols + m - 1 &&
src.type() == dst.type() && src.type() == CV_8UC1 );
@@ -1663,10 +1663,10 @@ static void test_integral( const Mat& img, Mat* sum, Mat* sqsum, Mat* tilted )
double* sdata = sum->ptr<double>();
double* sqdata = sqsum ? sqsum->ptr<double>() : 0;
double* tdata = tilted ? tilted->ptr<double>() : 0;
int step = img.step/sizeof(data[0]);
int sstep = sum->step/sizeof(sdata[0]);
int sqstep = sqsum ? sqsum->step/sizeof(sqdata[0]) : 0;
int tstep = tilted ? tilted->step/sizeof(tdata[0]) : 0;
int step = (int)(img.step/sizeof(data[0]));
int sstep = (int)(sum->step/sizeof(sdata[0]));
int sqstep = sqsum ? (int)(sqsum->step/sizeof(sqdata[0])) : 0;
int tstep = tilted ? (int)(tilted->step/sizeof(tdata[0])) : 0;
Size size = img.size();
memset( sdata, 0, (size.width+1)*sizeof(sdata[0]) );
+2 -2
View File
@@ -347,7 +347,7 @@ static void test_remap( const Mat& src, Mat& dst, const Mat& mapx, const Mat& ma
uchar* sptr0 = src.data;
int depth = src.depth(), cn = src.channels();
int elem_size = (int)src.elemSize();
int step = src.step / CV_ELEM_SIZE(depth);
int step = (int)(src.step / CV_ELEM_SIZE(depth));
int delta;
if( interpolation != CV_INTER_CUBIC )
@@ -1100,7 +1100,7 @@ void CV_UndistortMapTest::prepare_to_validation( int )
static void
test_getQuadrangeSubPix( const Mat& src, Mat& dst, double* a )
{
int sstep = src.step / sizeof(float);
int sstep = (int)(src.step / sizeof(float));
int scols = src.cols, srows = src.rows;
CV_Assert( src.depth() == CV_32F && src.type() == dst.type() );