From 0a31043bc595d3475cf3ee885df2e078860ab0d0 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Fri, 20 Sep 2024 14:37:35 +0200 Subject: [PATCH] Simplify osmdata_t class Remove some functions and inline code. --- src/osmdata.cpp | 23 +++++++++-------------- src/osmdata.hpp | 10 ---------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/osmdata.cpp b/src/osmdata.cpp index 3ced9ed31..d35032892 100644 --- a/src/osmdata.cpp +++ b/src/osmdata.cpp @@ -432,10 +432,16 @@ void osmdata_t::process_dependents() proc.process_relations_stage1c(std::move(rels_pending_tracker)); } -void osmdata_t::reprocess_marked() const { m_output->reprocess_marked(); } - -void osmdata_t::postprocess_database() const +void osmdata_t::stop() { + if (m_append) { + process_dependents(); + } + + // Run stage 2 processing: Reprocess objects marked in stage 1 (if any). + m_output->reprocess_marked(); + + // Run postprocessing on database: Clustering and index creation. m_output->free_middle_references(); if (m_droptemp) { @@ -458,14 +464,3 @@ void osmdata_t::postprocess_database() const m_mid->wait(); m_output->wait(); } - -void osmdata_t::stop() -{ - if (m_append) { - process_dependents(); - } - - reprocess_marked(); - - postprocess_database(); -} diff --git a/src/osmdata.hpp b/src/osmdata.hpp index f4dc78c4d..709b4ef2e 100644 --- a/src/osmdata.hpp +++ b/src/osmdata.hpp @@ -76,16 +76,6 @@ class osmdata_t : public osmium::handler::Handler */ void process_dependents(); - /** - * Run stage 2 processing: Reprocess objects marked in stage 1 (if any). - */ - void reprocess_marked() const; - - /** - * Run postprocessing on database: Clustering and index creation. - */ - void postprocess_database() const; - /** * In append mode all new and changed nodes will be added to this. After * all nodes are read this is used to figure out which parent ways and