Skip to content

Commit 1ea23cc

Browse files
committed
Move static function into implementation file
1 parent e1db08c commit 1ea23cc

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/progress-display.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ void progress_display_t::print_summary() const
1414
m_rel.max, rels_time(now));
1515
}
1616

17+
static double count_per_second(osmid_t count, uint64_t elapsed) noexcept
18+
{
19+
if (count == 0) {
20+
return 0.0;
21+
}
22+
23+
if (elapsed == 0) {
24+
return count;
25+
}
26+
27+
return static_cast<double>(count) / elapsed;
28+
}
29+
1730
void progress_display_t::print_status(std::time_t now) const
1831
{
1932
if (m_enabled) {

src/progress-display.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,6 @@ class progress_display_t : public osmium::handler::Handler
7676
void possibly_print_status();
7777
void print_status(std::time_t now) const;
7878

79-
static double count_per_second(osmid_t count, uint64_t elapsed) noexcept
80-
{
81-
if (count == 0) {
82-
return 0.0;
83-
}
84-
85-
if (elapsed == 0) {
86-
return count;
87-
}
88-
89-
return static_cast<double>(count) / elapsed;
90-
}
91-
9279
uint64_t nodes_time(std::time_t now) const noexcept
9380
{
9481
if (m_node.count == 0) {

0 commit comments

Comments
 (0)