Merge pull request #6599 from afabri/Polyline_simplification-constref-GF

Polyline simplification: Use const&  in demo instead of copying a polygon
This commit is contained in:
Sebastien Loriot 2022-05-26 18:11:38 +02:00 committed by GitHub
commit b8e3ab9a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ void MainWindow::loadWKT(QString fileName)
m_pct.insert_constraint(poly.begin(), poly.end());
}
}
for(Polygon_with_holes_2 poly : polygons){
for(const Polygon_with_holes_2& poly : polygons){
m_pct.insert_constraint(poly.outer_boundary().vertices_begin(), poly.outer_boundary().vertices_end());
for(Polygon_with_holes_2::Hole_const_iterator it = poly.holes_begin(); it != poly.holes_end(); ++it){
const Polygon_2& hole = *it;