Skip to content

Commit cd5bf8e

Browse files
authored
Merge pull request #1408 from joto/better-counter-type
Use better type for counter (std::size_t instead of osmid_t)
2 parents 4d20f52 + f85c305 commit cd5bf8e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/progress-display.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "progress-display.hpp"
1313
#include "util.hpp"
1414

15-
static double count_per_second(osmid_t count, uint64_t elapsed) noexcept
15+
static double count_per_second(std::size_t count, uint64_t elapsed) noexcept
1616
{
1717
if (count == 0) {
1818
return 0.0;
@@ -25,7 +25,7 @@ static double count_per_second(osmid_t count, uint64_t elapsed) noexcept
2525
return static_cast<double>(count) / elapsed;
2626
}
2727

28-
static std::string cps_display(osmid_t count, uint64_t elapsed)
28+
static std::string cps_display(std::size_t count, uint64_t elapsed)
2929
{
3030
double const cps = count_per_second(count, elapsed);
3131

src/progress-display.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323

2424
#include <osmium/handler.hpp>
2525

26-
#include "format.hpp"
27-
#include "osmtypes.hpp"
28-
2926
/**
3027
* The progress_display_t class is used to display how far the processing of
3128
* the input data has progressed.
@@ -37,7 +34,7 @@ class progress_display_t : public osmium::handler::Handler
3734
std::size_t count = 0;
3835
std::time_t start = 0;
3936

40-
osmid_t count_k() const noexcept { return count / 1000; }
37+
std::size_t count_k() const noexcept { return count / 1000; }
4138
};
4239

4340
public:

0 commit comments

Comments
 (0)