summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-03 16:25:26 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-03 16:25:26 (GMT)
commit50e1269a4c6165c67db3aac867d03f052460eab5 (patch)
treea4944649ea5dd8c384f2a9aee06dfcb14c01e0b2
parent38e91e8eeddbab817b37f38e7b69bb623cc52035 (diff)
Simplify
-rw-r--r--tools/osm-simplify/LineStringProcessor.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/osm-simplify/LineStringProcessor.cpp b/tools/osm-simplify/LineStringProcessor.cpp
index e443a34..cf2d646 100644
--- a/tools/osm-simplify/LineStringProcessor.cpp
+++ b/tools/osm-simplify/LineStringProcessor.cpp
@@ -34,9 +34,7 @@ LineStringProcessor::LineStringProcessor(GeoDataDocument* document) :
void LineStringProcessor::process()
{
qDebug() << "Polylines to process: " << placemarks().size();
-
- QList<GeoDataObject*> polylinesToDrop;
-
+ QList<GeoDataPlacemark*> polylinesToDrop;
foreach (GeoDataPlacemark* polyline, placemarks()) {
switch(polyline->visualCategory())
@@ -59,15 +57,13 @@ void LineStringProcessor::process()
}
int removed = 0;
-
- foreach (GeoDataObject* polyline, polylinesToDrop) {
- if(document()->removeOne(static_cast<GeoDataFeature*>(polyline))) {
+ foreach (auto* polyline, polylinesToDrop) {
+ if(document()->removeOne(polyline)) {
++removed;
}
}
qDebug() << "Polylines dropped: " << removed;
-
qDebug() << document()->name();
}