Skip to content

Commit 1ca0243

Browse files
committed
Remove now unused has_pending() function in outputs
1 parent d8f70d7 commit 1ca0243

File tree

10 files changed

+1
-42
lines changed

10 files changed

+1
-42
lines changed

src/osmdata.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,6 @@ struct pending_threaded_processor : public middle_t::pending_processor
401401

402402
} // anonymous namespace
403403

404-
/**
405-
* Is there any pending work in the middle or one of the outputs?
406-
*/
407-
bool osmdata_t::has_pending() const noexcept
408-
{
409-
if (m_mid->has_pending()) {
410-
return true;
411-
}
412-
413-
return std::any_of(m_outs.cbegin(), m_outs.cend(),
414-
[](std::shared_ptr<output_t> const &out) {
415-
return out->has_pending();
416-
});
417-
}
418-
419404
void osmdata_t::stop() const
420405
{
421406
/* Commit the transactions, so that multiple processes can
@@ -432,7 +417,7 @@ void osmdata_t::stop() const
432417
auto const *opts = m_outs[0]->get_options();
433418

434419
// are there any objects left pending?
435-
if (has_pending()) {
420+
if (m_mid->has_pending()) {
436421
//threaded pending processing
437422
pending_threaded_processor ptp(m_mid, m_outs, opts->num_procs,
438423
opts->append);

src/osmdata.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class osmdata_t
3434

3535
private:
3636
slim_middle_t &slim_middle() const noexcept;
37-
bool has_pending() const noexcept;
3837

3938
std::shared_ptr<middle_t> m_mid;
4039
std::vector<std::shared_ptr<output_t>> m_outs;

src/output-flex.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,11 +1334,6 @@ void output_flex_t::init_lua(std::string const &filename)
13341334
lua_remove(lua_state(), 1); // global "osm2pgsql"
13351335
}
13361336

1337-
bool output_flex_t::has_pending() const
1338-
{
1339-
return false;
1340-
}
1341-
13421337
void output_flex_t::stage2_proc()
13431338
{
13441339
bool const has_marked_ways = !m_stage2_ways_tracker->empty();

src/output-flex.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ class output_flex_t : public output_t
7979
void way_delete(osmid_t id) override;
8080
void relation_delete(osmid_t id) override;
8181

82-
bool has_pending() const override;
83-
8482
void merge_pending_relations(output_t *other) override;
8583
void merge_expire_trees(output_t *other) override;
8684

src/output-multi.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ void output_multi_t::start()
6565
m_options.tblsmain_data);
6666
}
6767

68-
bool output_multi_t::has_pending() const
69-
{
70-
return false;
71-
}
72-
7368
void output_multi_t::pending_way(osmid_t id, int exists)
7469
{
7570
// Try to fetch the way from the DB

src/output-multi.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ class output_multi_t : public output_t
6464
void way_delete(osmid_t id) override;
6565
void relation_delete(osmid_t id) override;
6666

67-
bool has_pending() const override;
68-
6967
void merge_pending_relations(output_t *other) override;
7068
void merge_expire_trees(output_t *other) override;
7169

src/output-pgsql.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,6 @@ output_pgsql_t::output_pgsql_t(
425425

426426
output_pgsql_t::~output_pgsql_t() = default;
427427

428-
bool output_pgsql_t::has_pending() const
429-
{
430-
return false;
431-
}
432-
433428
void output_pgsql_t::merge_pending_relations(output_t *)
434429
{
435430
}

src/output-pgsql.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ class output_pgsql_t : public output_t
6464
void way_delete(osmid_t id) override;
6565
void relation_delete(osmid_t id) override;
6666

67-
bool has_pending() const override;
68-
6967
void merge_pending_relations(output_t *other) override;
7068
void merge_expire_trees(output_t *other) override;
7169

src/output.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ output_t::output_t(std::shared_ptr<middle_query_t> const &mid,
197197

198198
output_t::~output_t() = default;
199199

200-
bool output_t::has_pending() const { return false; }
201-
202200
options_t const *output_t::get_options() const { return &m_options; }
203201

204202
void output_t::merge_pending_relations(output_t *) {}

src/output.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ class output_t
7373
virtual void way_delete(osmid_t id) = 0;
7474
virtual void relation_delete(osmid_t id) = 0;
7575

76-
virtual bool has_pending() const;
77-
7876
const options_t *get_options() const;
7977

8078
virtual void merge_pending_relations(output_t *other);

0 commit comments

Comments
 (0)