Merge pull request #24278 from georgthegreat:compat-fixes

More fixes for iterators-are-pointers case
This commit is contained in:
Alexander Smorkalov 2023-09-18 10:47:53 +03:00 committed by GitHub
commit 0a53afe8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -55,15 +55,12 @@ static void icvGetQuadrangleHypotheses(const std::vector<std::vector< cv::Point
const float max_aspect_ratio = 3.0f;
const float min_box_size = 10.0f;
typedef std::vector< std::vector< cv::Point > >::const_iterator iter_t;
iter_t i;
for (i = contours.begin(); i != contours.end(); ++i)
for (size_t i = 0; i < contours.size(); ++i)
{
const iter_t::difference_type idx = i - contours.begin();
if (hierarchy.at(idx)[3] != -1)
if (hierarchy.at(i)[3] != -1)
continue; // skip holes
const std::vector< cv::Point > & c = *i;
const std::vector< cv::Point > & c = contours[i];
cv::RotatedRect box = cv::minAreaRect(c);
float box_size = MAX(box.size.width, box.size.height);

View File

@ -349,7 +349,7 @@ int quad_segment_maxima(const DetectorParameters &td, int sz, struct line_fit_pt
}
y[iy] = acc;
}
copy(y.begin(), y.end(), errs.begin());
std::copy(y.begin(), y.end(), errs.begin());
}
std::vector<int> maxima(sz);