Skip to content

Commit 691f016

Browse files
authored
Merge pull request #1148 from joto/misc-cleanups
Various small code cleanups
2 parents 497235b + 1151198 commit 691f016

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/db-copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ db_copy_thread_t::db_copy_thread_t(std::string const &conninfo)
7373
{
7474
// conninfo is captured by copy here, because we don't know wether the
7575
// reference will still be valid once we get around to running the thread
76-
m_worker = std::thread(thread_t{conninfo, m_shared});
76+
m_worker = std::thread{thread_t{conninfo, m_shared}};
7777
}
7878

7979
db_copy_thread_t::~db_copy_thread_t() { finish(); }

src/domain-matcher.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <osmium/osm/tag.hpp>
55

66
#include <cstring>
7-
#include <string>
87

98
/**
109
* Returns the tag specific name, if applicable.
@@ -19,7 +18,7 @@
1918
class DomainMatcher
2019
{
2120
public:
22-
explicit DomainMatcher(char const *cls)
21+
explicit DomainMatcher(char const *cls) noexcept
2322
: m_domain(cls), m_len(std::strlen(cls))
2423
{}
2524

src/osmdata.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include <algorithm>
22
#include <chrono>
3-
#include <cstdio>
43
#include <functional>
54
#include <future>
5+
#include <memory>
66
#include <mutex>
77
#include <stdexcept>
88
#include <utility>
@@ -209,7 +209,7 @@ struct pending_threaded_processor : public middle_t::pending_processor
209209

210210
fmt::print(stderr, "\rLeft to process: {}...", queue_size);
211211

212-
std::this_thread::sleep_for(std::chrono::seconds(1));
212+
std::this_thread::sleep_for(std::chrono::seconds{1});
213213
} while (queue_size > 0);
214214
}
215215

src/parse-osmium.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void parse_stats_t::print_summary() const
4949
m_rel.count, m_rel.max, rels_time(now));
5050
}
5151

52-
void parse_stats_t::print_status(time_t now) const
52+
void parse_stats_t::print_status(std::time_t now) const
5353
{
5454
fmt::print(
5555
stderr,

src/parse-osmium.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class parse_stats_t
6060

6161
void update(parse_stats_t const &other);
6262
void print_summary() const;
63-
void print_status(time_t now) const;
63+
void print_status(std::time_t now) const;
6464
void possibly_print_status();
6565

6666
void add_node(osmid_t id)

0 commit comments

Comments
 (0)