Commit f32611d6 authored by Volker Krause's avatar Volker Krause Committed by Torsten Rahn
Browse files

Avoid unnecessary detaches of polygon geometry during clipping

parent 977bf257
......@@ -246,7 +246,7 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
}
using namespace ClipperLib;
Path path;
for(auto const & node: polygon->outerBoundary()) {
for(auto const & node: qAsConst(polygon)->outerBoundary()) {
path << IntPoint(&node);
}
......@@ -299,7 +299,7 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
newOuterRingOsmData.addTag(QStringLiteral("mx:oid"), QString::number(outerRingOsmData.id()));
}
auto const & innerBoundaries = polygon->innerBoundaries();
auto const & innerBoundaries = qAsConst(polygon)->innerBoundaries();
for (index = 0; index < innerBoundaries.size(); ++index) {
auto const & innerBoundary = innerBoundaries.at(index);
if (minArea > 0.0 && area(innerBoundary) < minArea) {
......
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