Skip to content

Commit

Permalink
calib3d: fixed VS2019 warning C4756
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabunin committed Mar 23, 2020
1 parent 39b64fc commit 2f665ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/calib3d/src/quadsubpix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ static void orderContours(const std::vector<std::vector<Point> >& contours, Poin
for(i = 0; i < n; i++)
{
size_t ni = contours[i].size();
double min_dist = std::numeric_limits<double>::max();
float min_dist = std::numeric_limits<float>::max();
for(j = 0; j < ni; j++)
{
double dist = norm(Point2f((float)contours[i][j].x, (float)contours[i][j].y) - point);
min_dist = MIN(min_dist, dist);
min_dist = (float)MIN((double)min_dist, dist);
}
order.push_back(std::pair<int, float>((int)i, (float)min_dist));
order.push_back(std::pair<int, float>((int)i, min_dist));
}

std::sort(order.begin(), order.end(), is_smaller);
Expand Down

0 comments on commit 2f665ec

Please sign in to comment.