Commit 97835a8f authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed 9 more build warnings

parent 3b3d1a86
...@@ -440,7 +440,7 @@ cv::Mesh3D::~Mesh3D() {} ...@@ -440,7 +440,7 @@ cv::Mesh3D::~Mesh3D() {}
void cv::Mesh3D::buildOctree() { if (octree.getNodes().empty()) octree.buildTree(vtx); } void cv::Mesh3D::buildOctree() { if (octree.getNodes().empty()) octree.buildTree(vtx); }
void cv::Mesh3D::clearOctree(){ octree = Octree(); } void cv::Mesh3D::clearOctree(){ octree = Octree(); }
float cv::Mesh3D::estimateResolution(float tryRatio) float cv::Mesh3D::estimateResolution(float /*tryRatio*/)
{ {
#if 0 #if 0
const int neighbors = 3; const int neighbors = 3;
......
...@@ -2148,7 +2148,7 @@ void cv::calcCovarMatrix( InputArray _data, OutputArray _covar, InputOutputArray ...@@ -2148,7 +2148,7 @@ void cv::calcCovarMatrix( InputArray _data, OutputArray _covar, InputOutputArray
ctype = std::max(std::max(CV_MAT_DEPTH(ctype >= 0 ? ctype : type), _mean.depth()), CV_32F); ctype = std::max(std::max(CV_MAT_DEPTH(ctype >= 0 ? ctype : type), _mean.depth()), CV_32F);
Mat _data(src.size(), size.area(), type); Mat _data(static_cast<int>(src.size()), size.area(), type);
int i = 0; int i = 0;
for(vector<cv::Mat>::iterator each = src.begin(); each != src.end(); each++, i++ ) for(vector<cv::Mat>::iterator each = src.begin(); each != src.end(); each++, i++ )
......
...@@ -2544,7 +2544,7 @@ TEST(CovariationMatrixVectorOfMat, accuracy) ...@@ -2544,7 +2544,7 @@ TEST(CovariationMatrixVectorOfMat, accuracy)
std::vector<cv::Mat> srcVec; std::vector<cv::Mat> srcVec;
for(size_t i = 0; i < vector_size; i++) for(size_t i = 0; i < vector_size; i++)
{ {
srcVec.push_back(src.row(i).reshape(0,col_problem_size)); srcVec.push_back(src.row(static_cast<int>(i)).reshape(0,col_problem_size));
} }
cv::Mat actual; cv::Mat actual;
...@@ -2579,7 +2579,7 @@ TEST(CovariationMatrixVectorOfMatWithMean, accuracy) ...@@ -2579,7 +2579,7 @@ TEST(CovariationMatrixVectorOfMatWithMean, accuracy)
std::vector<cv::Mat> srcVec; std::vector<cv::Mat> srcVec;
for(size_t i = 0; i < vector_size; i++) for(size_t i = 0; i < vector_size; i++)
{ {
srcVec.push_back(src.row(i).reshape(0,col_problem_size)); srcVec.push_back(src.row(static_cast<int>(i)).reshape(0,col_problem_size));
} }
cv::Mat actual; cv::Mat actual;
......
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
#include <zlib.h> #include <zlib.h>
#include "grfmt_png.hpp" #include "grfmt_png.hpp"
#if defined _MSC_VER && _MSC_VER >= 1200
// disable warnings related to _setjmp
#pragma warning( disable: 4611 )
#endif
namespace cv namespace cv
{ {
......
...@@ -77,9 +77,9 @@ void generateData( Mat& data, Mat& labels, const vector<int>& sizes, const Mat& ...@@ -77,9 +77,9 @@ void generateData( Mat& data, Mat& labels, const vector<int>& sizes, const Mat&
int total = 0; int total = 0;
for( ; sit != sizes.end(); ++sit ) for( ; sit != sizes.end(); ++sit )
total += *sit; total += *sit;
assert( _means.rows == (int)sizes.size() && covs.size() == sizes.size() ); CV_Assert( _means.rows == (int)sizes.size() && covs.size() == sizes.size() );
assert( !data.empty() && data.rows == total ); CV_Assert( !data.empty() && data.rows == total );
assert( data.type() == dataType ); CV_Assert( data.type() == dataType );
labels.create( data.rows, 1, labelType ); labels.create( data.rows, 1, labelType );
......
...@@ -22,7 +22,7 @@ void FormTrackingPointsArray(vector<Point2f>& points, int width, int height, int ...@@ -22,7 +22,7 @@ void FormTrackingPointsArray(vector<Point2f>& points, int width, int height, int
{ {
for( int y = stepY / 2; y < height; y += stepY ) for( int y = stepY / 2; y < height; y += stepY )
{ {
Point2f pt(x,y); Point2f pt(static_cast<float>(x), static_cast<float>(y));
points.push_back(pt); points.push_back(pt);
} }
} }
......
...@@ -74,12 +74,12 @@ template <typename T> inline const T& at(int index, const T *items, int size) ...@@ -74,12 +74,12 @@ template <typename T> inline const T& at(int index, const T *items, int size)
template <typename T> inline T& at(int index, std::vector<T> &items) template <typename T> inline T& at(int index, std::vector<T> &items)
{ {
return at(index, &items[0], items.size()); return at(index, &items[0], static_cast<int>(items.size()));
} }
template <typename T> inline const T& at(int index, const std::vector<T> &items) template <typename T> inline const T& at(int index, const std::vector<T> &items)
{ {
return items[cv::borderInterpolate(index, items.size(), cv::BORDER_WRAP)]; return items[cv::borderInterpolate(index, static_cast<int>(items.size()), cv::BORDER_WRAP)];
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment