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

@@ -139,8 +139,8 @@ void CV_FeatureDetectorTest::compareKeypointSets( const vector<KeyPoint>& validK
return;
}
int progress = 0, progressCount = validKeypoints.size() * calcKeypoints.size();
int badPointCount = 0, commonPointCount = max(validKeypoints.size(), calcKeypoints.size());
int progress = 0, progressCount = (int)(validKeypoints.size() * calcKeypoints.size());
int badPointCount = 0, commonPointCount = max((int)validKeypoints.size(), (int)calcKeypoints.size());
for( size_t v = 0; v < validKeypoints.size(); v++ )
{
int nearestIdx = -1;
@@ -148,12 +148,12 @@ void CV_FeatureDetectorTest::compareKeypointSets( const vector<KeyPoint>& validK
for( size_t c = 0; c < calcKeypoints.size(); c++ )
{
progress = update_progress( progress, v*calcKeypoints.size() + c, progressCount, 0 );
progress = update_progress( progress, (int)(v*calcKeypoints.size() + c), progressCount, 0 );
float curDist = (float)norm( calcKeypoints[c].pt - validKeypoints[v].pt );
if( curDist < minDist )
{
minDist = curDist;
nearestIdx = c;
nearestIdx = (int)c;
}
}
@@ -256,7 +256,7 @@ static void writeMatInBin( const Mat& mat, const string& filename )
fwrite( (void*)&mat.rows, sizeof(int), 1, f );
fwrite( (void*)&mat.cols, sizeof(int), 1, f );
fwrite( (void*)&type, sizeof(int), 1, f );
int dataSize = mat.step * mat.rows * mat.channels();
int dataSize = (int)(mat.step * mat.rows * mat.channels());
fwrite( (void*)&dataSize, sizeof(int), 1, f );
fwrite( (void*)mat.data, 1, dataSize, f );
fclose(f);