Skip to content

Commit 94f4007

Browse files
committed
Remove unused ways_done_tracker from multi output
1 parent 44d8046 commit 94f4007

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/output-multi.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ output_multi_t::output_multi_t(
2828
export_list.normal_columns(m_osm_type),
2929
m_options.hstore_columns, m_processor->srid(),
3030
m_options.append, m_options.hstore_mode, copy_thread}),
31-
ways_done_tracker(new id_tracker{}),
3231
m_expire(m_options.expire_tiles_zoom, m_options.expire_tiles_max_bbox,
3332
m_options.projection),
3433
buffer(1024, osmium::memory::Buffer::auto_grow::yes),
@@ -44,10 +43,6 @@ output_multi_t::output_multi_t(
4443
m_processor(other->m_processor), m_proj(other->m_proj),
4544
m_osm_type(other->m_osm_type),
4645
m_table(new table_t{*other->m_table, copy_thread}),
47-
// NOTE: we need to know which ways were used by relations so each thread
48-
// must have a copy of the original marked done ways, its read only so its
49-
// ok
50-
ways_done_tracker(other->ways_done_tracker),
5146
m_expire(m_options.expire_tiles_zoom, m_options.expire_tiles_max_bbox,
5247
m_options.projection),
5348
buffer(1024, osmium::memory::Buffer::auto_grow::yes),
@@ -88,7 +83,7 @@ void output_multi_t::enqueue_ways(pending_queue_t &job_queue, osmid_t id,
8883
}
8984

9085
//make sure we get the one passed in
91-
if (!ways_done_tracker->is_marked(id) && id_tracker::is_valid(id)) {
86+
if (id_tracker::is_valid(id)) {
9287
job_queue.push(pending_job_t(id, output_id));
9388
++added;
9489
}
@@ -101,17 +96,14 @@ void output_multi_t::enqueue_ways(pending_queue_t &job_queue, osmid_t id,
10196

10297
//get all the ones up to the id that was passed in
10398
while (popped < id) {
104-
if (!ways_done_tracker->is_marked(popped)) {
105-
job_queue.push(pending_job_t(popped, output_id));
106-
++added;
107-
}
99+
job_queue.push(pending_job_t(popped, output_id));
100+
++added;
108101
popped = ways_pending_tracker.pop_mark();
109102
}
110103

111104
//make sure to get this one as well and move to the next
112105
if (popped > id) {
113-
if (!ways_done_tracker->is_marked(popped) &&
114-
id_tracker::is_valid(popped)) {
106+
if (id_tracker::is_valid(popped)) {
115107
job_queue.push(pending_job_t(popped, output_id));
116108
++added;
117109
}

src/output-multi.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class output_multi_t : public output_t
8888
osmium::item_type const m_osm_type;
8989
std::unique_ptr<table_t> m_table;
9090
id_tracker ways_pending_tracker, rels_pending_tracker;
91-
std::shared_ptr<id_tracker> ways_done_tracker;
9291
expire_tiles m_expire;
9392
relation_helper m_relation_helper;
9493
osmium::memory::Buffer buffer;

0 commit comments

Comments
 (0)