summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:15:23 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:15:23 (GMT)
commit55b28190ab538697d4a977bd1ff2a11e213b9aac (patch)
tree6522d2fe5af09a7cca580c3dd6f14bd08400b675
parent85ff00bcdd42dc1667349cc6d2d56941dd8863a8 (diff)
Use initializer list, fix whitespace
-rw-r--r--tools/osm-simplify/NodeReducer.cpp7
-rw-r--r--tools/osm-simplify/NodeReducer.h18
2 files changed, 14 insertions, 11 deletions
diff --git a/tools/osm-simplify/NodeReducer.cpp b/tools/osm-simplify/NodeReducer.cpp
index f0523ef..5fc08cc 100644
--- a/tools/osm-simplify/NodeReducer.cpp
+++ b/tools/osm-simplify/NodeReducer.cpp
@@ -20,10 +20,11 @@
#include <QVector>
NodeReducer::NodeReducer(GeoDataDocument* document, int zoomLevel) :
- PlacemarkFilter(document)
+ PlacemarkFilter(document),
+ m_resolution(resolutionForLevel(zoomLevel)),
+ m_count(0)
{
- m_resolution = resolutionForLevel(zoomLevel);
- m_count = 0;
+ // nothing to do
}
void NodeReducer::process()
diff --git a/tools/osm-simplify/NodeReducer.h b/tools/osm-simplify/NodeReducer.h
index 7709a79..29dbbbc 100644
--- a/tools/osm-simplify/NodeReducer.h
+++ b/tools/osm-simplify/NodeReducer.h
@@ -14,15 +14,17 @@
#include "PlacemarkFilter.h"
#include "GeoDataLineString.h"
-class NodeReducer : public PlacemarkFilter{
+class NodeReducer : public PlacemarkFilter {
public:
- NodeReducer(GeoDataDocument* document, int zoomLevel);
- virtual void process();
+ NodeReducer(GeoDataDocument* document, int zoomLevel);
+ virtual void process();
+
private:
- GeoDataLineString* reduce(GeoDataLineString* lineString);
- static qreal resolutionForLevel(int level);
- qreal m_resolution;
- qint64 m_count;
+ GeoDataLineString* reduce(GeoDataLineString* lineString);
+ static qreal resolutionForLevel(int level);
+
+ qreal m_resolution;
+ qint64 m_count;
};
-#endif \ No newline at end of file
+#endif