summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-08 17:05:12 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-08 17:05:12 (GMT)
commit6f21c01ffb7d5bd05d9dd94844c855fd4894d7a5 (patch)
tree6089452c5185e0553077224b862f5279af1abc45
parentfb427298b1d31734b86ebdca4e6be04d7ff570d1 (diff)
WayConcatenator::getWayChunk(...) -> WayConcatenator::wayChunk(...) const
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.cpp12
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.cpp b/tools/vectorosm-tilecreator/WayConcatenator.cpp
index ad7a429..796b971 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.cpp
+++ b/tools/vectorosm-tilecreator/WayConcatenator.cpp
@@ -61,7 +61,7 @@ void WayConcatenator::process()
++chunkCount;
} else if (containsFirst && !containsLast) {
qDebug()<<"First coord matched";
- WayChunk *chunk = getWayChunk(placemark, firstId);
+ WayChunk *chunk = wayChunk(placemark, firstId);
if (chunk != nullptr) {
// qDebug()<< "First* Chunk found, concatenating to it";
concatFirst(placemark, chunk);
@@ -78,7 +78,7 @@ void WayConcatenator::process()
++count;
} else if (!containsFirst && containsLast) {
qDebug()<<"Last coord matched";
- WayChunk *chunk = getWayChunk(placemark, lastId);
+ WayChunk *chunk = wayChunk(placemark, lastId);
if (chunk != nullptr) {
// qDebug()<< "Last* Chunk found, concatenating to it";
concatLast(placemark, chunk);
@@ -95,8 +95,8 @@ void WayConcatenator::process()
++count;
} else if (containsFirst && containsLast) {
qDebug()<<"Both coord matched";
- WayChunk *chunk = getWayChunk(placemark, firstId);
- WayChunk *otherChunk = getWayChunk(placemark, lastId);
+ WayChunk *chunk = wayChunk(placemark, firstId);
+ WayChunk *otherChunk = wayChunk(placemark, lastId);
if (chunk != nullptr && otherChunk != nullptr) {
// qDebug()<< "Both* Both chunks found, concatenating to it";
@@ -210,12 +210,12 @@ void WayConcatenator::createWayChunk(GeoDataPlacemark *placemark, qint64 firstId
m_chunks.append(chunk);
}
-WayChunk* WayConcatenator::getWayChunk(GeoDataPlacemark *placemark, qint64 matchId)
+WayChunk* WayConcatenator::wayChunk(GeoDataPlacemark *placemark, qint64 matchId) const
{
qDebug()<<"Searching for a compatible WayChunk";
qDebug()<<"Visual category for placemark"<<StyleBuilder::visualCategoryName(placemark->visualCategory());
- QHash<qint64, WayChunk*>::iterator matchItr = m_hash.find(matchId);
+ QHash<qint64, WayChunk*>::ConstIterator matchItr = m_hash.find(matchId);
while (matchItr != m_hash.end() && matchItr.key() == matchId) {
WayChunk *chunk = matchItr.value();
qDebug()<<" * Chunk ID: "<<chunk->id()<<" Visual category for chunk"<<StyleBuilder::visualCategoryName(chunk->visualCategory());
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.h b/tools/vectorosm-tilecreator/WayConcatenator.h
index 00f84a7..5ca965d 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.h
+++ b/tools/vectorosm-tilecreator/WayConcatenator.h
@@ -27,7 +27,7 @@ public:
private:
void createWayChunk(GeoDataPlacemark *placemark, qint64 firstId, qint64 lastId);
- WayChunk* getWayChunk(GeoDataPlacemark *placemark, qint64 matchId);
+ WayChunk* wayChunk(GeoDataPlacemark *placemark, qint64 matchId) const;
void concatFirst(GeoDataPlacemark *placemark, WayChunk *chunk);
void concatLast(GeoDataPlacemark *placemark, WayChunk *chunk);
void concatBoth(GeoDataPlacemark *placemark, WayChunk *chunk, WayChunk *otherChunk);