Skip to content

Commit

Permalink
Simplify osmdata_t class
Browse files Browse the repository at this point in the history
Remove some functions and inline code.
joto committed Nov 29, 2024

Verified

This commit was signed with the committer’s verified signature.
nilsingwersen Nils Ingwersen
1 parent acb840a commit 0a31043
Showing 2 changed files with 9 additions and 24 deletions.
23 changes: 9 additions & 14 deletions src/osmdata.cpp
Original file line number Diff line number Diff line change
@@ -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();
}
10 changes: 0 additions & 10 deletions src/osmdata.hpp
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0a31043

Please sign in to comment.