summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 15:31:17 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 15:31:17 (GMT)
commit429811c2d14ec85ef42f91ec834ac738279e4cf5 (patch)
treed2332f3b242a7b526d5c7d41b98d22dd680e44c1
parent2f1b6b940b4a1f4f861825824d888102159f1b32 (diff)
pass a reference rather than a pointer
-rw-r--r--tools/vectorosm-tilecreator/WayChunk.cpp4
-rw-r--r--tools/vectorosm-tilecreator/WayChunk.h2
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.cpp10
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/tools/vectorosm-tilecreator/WayChunk.cpp b/tools/vectorosm-tilecreator/WayChunk.cpp
index 3357abc..69399e1 100644
--- a/tools/vectorosm-tilecreator/WayChunk.cpp
+++ b/tools/vectorosm-tilecreator/WayChunk.cpp
@@ -111,9 +111,9 @@ int WayChunk::size() const
return m_wayList.size();
}
-bool WayChunk::concatPossible(const PlacemarkPtr &placemark) const
+bool WayChunk::concatPossible(const GeoDataPlacemark &placemark) const
{
- const GeoDataPlacemark::GeoDataVisualCategory category = placemark->visualCategory();
+ const GeoDataPlacemark::GeoDataVisualCategory category = placemark.visualCategory();
return (category == m_visualCategory);
}
diff --git a/tools/vectorosm-tilecreator/WayChunk.h b/tools/vectorosm-tilecreator/WayChunk.h
index b48ffed..3c8ab0b 100644
--- a/tools/vectorosm-tilecreator/WayChunk.h
+++ b/tools/vectorosm-tilecreator/WayChunk.h
@@ -46,7 +46,7 @@ public:
qint64 id() const;
void printIds() const;
int size() const;
- bool concatPossible(const PlacemarkPtr &placemark) const;
+ bool concatPossible(const GeoDataPlacemark &placemark) const;
private:
QVector<PlacemarkPtr> m_wayList;
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.cpp b/tools/vectorosm-tilecreator/WayConcatenator.cpp
index c268483..eb768a4 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.cpp
+++ b/tools/vectorosm-tilecreator/WayConcatenator.cpp
@@ -55,22 +55,22 @@ WayConcatenator::WayConcatenator(GeoDataDocument *document) :
if (!containsFirst && !containsLast) {
createWayChunk(placemark, firstId, lastId);
} else if (containsFirst && !containsLast) {
- auto chunk = wayChunk(placemark, firstId);
+ auto chunk = wayChunk(*placemark, firstId);
if (chunk != nullptr) {
concatFirst(placemark, chunk);
} else {
createWayChunk(placemark, firstId, lastId);
}
} else if (!containsFirst && containsLast) {
- auto chunk = wayChunk(placemark, lastId);
+ auto chunk = wayChunk(*placemark, lastId);
if (chunk != nullptr) {
concatLast(placemark, chunk);
} else {
createWayChunk(placemark, firstId, lastId);
}
} else if (containsFirst && containsLast) {
- auto chunk = wayChunk(placemark, firstId);
- auto otherChunk = wayChunk(placemark, lastId);
+ auto chunk = wayChunk(*placemark, firstId);
+ auto otherChunk = wayChunk(*placemark, lastId);
if (chunk != nullptr && otherChunk != nullptr) {
if(chunk == otherChunk) {
@@ -151,7 +151,7 @@ void WayConcatenator::createWayChunk(const PlacemarkPtr &placemark, qint64 first
m_chunks.append(chunk);
}
-WayChunk::Ptr WayConcatenator::wayChunk(const PlacemarkPtr &placemark, qint64 matchId) const
+WayChunk::Ptr WayConcatenator::wayChunk(const GeoDataPlacemark &placemark, qint64 matchId) const
{
QHash<qint64, WayChunk::Ptr>::ConstIterator matchItr = m_hash.find(matchId);
while (matchItr != m_hash.end() && matchItr.key() == matchId) {
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.h b/tools/vectorosm-tilecreator/WayConcatenator.h
index 1b1d8cb..3a95674 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.h
+++ b/tools/vectorosm-tilecreator/WayConcatenator.h
@@ -30,7 +30,7 @@ public:
private:
void createWayChunk(const PlacemarkPtr &placemark, qint64 firstId, qint64 lastId);
- WayChunk::Ptr wayChunk(const PlacemarkPtr &placemark, qint64 matchId) const;
+ WayChunk::Ptr wayChunk(const GeoDataPlacemark &placemark, qint64 matchId) const;
void concatFirst(const PlacemarkPtr &placemark, const WayChunk::Ptr &chunk);
void concatLast(const PlacemarkPtr & placemark, const WayChunk::Ptr &chunk);
void concatBoth(const PlacemarkPtr &placemark, const WayChunk::Ptr &chunk, const WayChunk::Ptr &otherChunk);