@@ -179,7 +179,7 @@ struct pending_threaded_processor : public pending_processor
179179 using output_vec_t = std::vector<std::shared_ptr<output_t >>;
180180
181181 static void do_jobs (output_vec_t const &outputs, pending_queue_t &queue,
182- std::mutex &mutex, bool append, bool ways)
182+ std::mutex &mutex, bool ways)
183183 {
184184 while (true ) {
185185 // get the job off the queue synchronously
@@ -195,9 +195,9 @@ struct pending_threaded_processor : public pending_processor
195195
196196 // process it
197197 if (ways) {
198- outputs.at (job.output_id )->pending_way (job.osm_id , append );
198+ outputs.at (job.output_id )->pending_way (job.osm_id , true );
199199 } else {
200- outputs.at (job.output_id )->pending_relation (job.osm_id , append );
200+ outputs.at (job.output_id )->pending_relation (job.osm_id , true );
201201 }
202202 }
203203 }
@@ -218,12 +218,11 @@ struct pending_threaded_processor : public pending_processor
218218
219219 // starts up count threads and works on the queue
220220 pending_threaded_processor (std::shared_ptr<middle_t > mid,
221- output_vec_t const &outs, size_t thread_count,
222- int append)
221+ output_vec_t const &outs, size_t thread_count)
223222 // note that we cant hint to the stack how large it should be ahead of time
224223 // we could use a different datastructure like a deque or vector but then
225224 // the outputs the enqueue jobs would need the version check for the push(_back) method
226- : outs(outs), append(append), queue()
225+ : outs(outs), queue()
227226 {
228227
229228 // clone all the things we need
@@ -263,7 +262,7 @@ struct pending_threaded_processor : public pending_processor
263262 for (auto const &clone : m_clones) {
264263 workers.push_back (std::async (std::launch::async, do_jobs,
265264 std::cref (clone), std::ref (queue),
266- std::ref (mutex), append, true ));
265+ std::ref (mutex), true ));
267266 }
268267 workers.push_back (std::async (std::launch::async, print_stats,
269268 std::ref (queue), std::ref (mutex)));
@@ -321,7 +320,7 @@ struct pending_threaded_processor : public pending_processor
321320 for (auto const &clone : m_clones) {
322321 workers.push_back (std::async (std::launch::async, do_jobs,
323322 std::cref (clone), std::ref (queue),
324- std::ref (mutex), append, false ));
323+ std::ref (mutex), false ));
325324 }
326325 workers.push_back (std::async (std::launch::async, print_stats,
327326 std::ref (queue), std::ref (mutex)));
@@ -369,8 +368,6 @@ struct pending_threaded_processor : public pending_processor
369368 std::vector<output_vec_t > m_clones;
370369 output_vec_t
371370 outs; // would like to move ownership of outs to osmdata_t and middle passed to output_t instead of owned by it
372- // appending to output that is already there (diff processing)
373- bool append;
374371 // job queue
375372 pending_queue_t queue;
376373
@@ -398,8 +395,7 @@ void osmdata_t::stop() const
398395 // In append mode there might be dependent objects pending that we
399396 // need to process.
400397 if (opts->append && m_dependency_manager->has_pending ()) {
401- pending_threaded_processor ptp (m_mid, m_outs, opts->num_procs ,
402- opts->append );
398+ pending_threaded_processor ptp (m_mid, m_outs, opts->num_procs );
403399
404400 m_dependency_manager->process_pending (ptp);
405401 }
0 commit comments