summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:02:04 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:02:04 (GMT)
commit78bad5baab40eaea0f69c5cecce3ae1a75ff2aae (patch)
tree97fc22fb9d28ce0364eef6d4272bede33bbe9ff0
parentdc4526e9c65fe71f3e8b73430935e61547b3875b (diff)
Do not reuse flag for different objects and make it const
-rw-r--r--tools/osm-simplify/TinyPlanetProcessor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/osm-simplify/TinyPlanetProcessor.cpp b/tools/osm-simplify/TinyPlanetProcessor.cpp
index 7cf6901..cf39eab 100644
--- a/tools/osm-simplify/TinyPlanetProcessor.cpp
+++ b/tools/osm-simplify/TinyPlanetProcessor.cpp
@@ -55,16 +55,13 @@ GeoDataDocument *TinyPlanetProcessor::cutToTiles(unsigned int zoomLevel, unsigne
if(tileBoundary.intersects(placemark->geometry()->latLonAltBox())) {
if( placemark->geometry()->nodeType() == GeoDataTypes::GeoDataPolygonType) {
-
- bool isClockwise = true;
-
GeoDataPolygon* marblePolygon = static_cast<GeoDataPolygon*>(placemark->geometry());
int index = -1;
using PolygonPair = QPair<GeoDataPlacemark*, QPolygonF>;
QVector<PolygonPair> newMarblePolygons;
- isClockwise = marblePolygon->outerBoundary().isClockwise();
+ bool const isClockwise = marblePolygon->outerBoundary().isClockwise();
QPolygonF outerBoundaryPolygon = BaseClipper::toQPolygon(marblePolygon->outerBoundary(), !isClockwise);
QVector<QPolygonF> outerBoundaries;
@@ -92,7 +89,7 @@ GeoDataDocument *TinyPlanetProcessor::cutToTiles(unsigned int zoomLevel, unsigne
foreach (const GeoDataLinearRing& innerBoundary, marblePolygon->innerBoundaries()) {
++index;
- isClockwise = innerBoundary.isClockwise();
+ bool const isClockwise = innerBoundary.isClockwise();
QPolygonF innerBoundaryPolygon = BaseClipper::toQPolygon(innerBoundary, !isClockwise);
QVector<QPolygonF> clippedPolygons;