Skip to content

Commit daace7b

Browse files
committed
Remove unnecessary progress_display_t::update() function
1 parent 697beeb commit daace7b

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

src/osm2pgsql.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ int main(int argc, char *argv[])
117117

118118
// Processing: In this phase the input file(s) are read and parsed,
119119
// populating some of the tables.
120-
progress_display_t progress;
121-
122120
util::timer_t timer_parse;
123121

124-
progress.update(osmdata.process_files(files, options.bbox));
122+
auto const progress = osmdata.process_files(files, options.bbox);
125123

126124
progress.print_status(std::time(nullptr));
127125
fmt::print(stderr, " parse time: {}\n",

src/progress-display.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
#include "logging.hpp"
33
#include "progress-display.hpp"
44

5-
void progress_display_t::update(progress_display_t const &other) noexcept
6-
{
7-
m_node += other.m_node;
8-
m_way += other.m_way;
9-
m_rel += other.m_rel;
10-
}
11-
125
void progress_display_t::print_summary() const
136
{
147
std::time_t const now = std::time(nullptr);

src/progress-display.hpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,13 @@ class progress_display_t
3535
}
3636
return ++count;
3737
}
38-
39-
Counter &operator+=(Counter const &rhs) noexcept
40-
{
41-
count += rhs.count;
42-
if (rhs.max > max) {
43-
max = rhs.max;
44-
}
45-
if (start == 0) {
46-
start = rhs.start;
47-
}
48-
49-
return *this;
50-
}
5138
};
5239

5340
public:
5441
progress_display_t() noexcept : m_last_print_time(std::time(nullptr)) {}
5542

56-
void update(progress_display_t const &other) noexcept;
5743
void print_summary() const;
5844
void print_status(std::time_t now) const;
59-
void possibly_print_status();
6045

6146
void add_node(osmid_t id)
6247
{
@@ -80,6 +65,8 @@ class progress_display_t
8065
}
8166

8267
private:
68+
void possibly_print_status();
69+
8370
static double count_per_second(osmid_t count, uint64_t elapsed) noexcept
8471
{
8572
if (count == 0) {

0 commit comments

Comments
 (0)