Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/common-cleanup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ namespace testing::cleanup {
class file_t
{
public:
file_t(std::string const &filename, bool remove_on_construct = true)
explicit file_t(std::string const &filename,
bool remove_on_construct = true)
: m_filename(filename)
{
if (remove_on_construct) {
Expand Down
2 changes: 1 addition & 1 deletion tests/common-import.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class data_t
static std::pair<osmium::item_type, osmium::object_id_type>
get_type_id(std::string const &str)
{
std::string ti(str, 0, str.find(' '));
std::string const ti(str, 0, str.find(' '));
return osmium::string_to_object_id(ti.c_str(),
osmium::osm_entity_bits::nwr);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/common-pg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace testing::pg {
class conn_t : public pg_conn_t
{
public:
conn_t(connection_params_t const &connection_params)
explicit conn_t(connection_params_t const &connection_params)
: pg_conn_t(connection_params, "test")
{
}
Expand Down Expand Up @@ -105,15 +105,15 @@ class tempdb_t
try {
connection_params_t connection_params;
connection_params.set("dbname", "postgres");
conn_t conn{connection_params};
conn_t const conn{connection_params};

m_db_name =
fmt::format("osm2pgsql-test-{}-{}", getpid(), time(nullptr));
conn.exec(R"(DROP DATABASE IF EXISTS "{}")", m_db_name);
conn.exec(R"(CREATE DATABASE "{}" WITH ENCODING 'UTF8')",
m_db_name);

conn_t local = connect();
conn_t const local = connect();
local.exec("CREATE EXTENSION postgis");
local.exec("CREATE EXTENSION hstore");
init_database_capabilities(local);
Expand Down Expand Up @@ -145,7 +145,7 @@ class tempdb_t
try {
connection_params_t connection_params;
connection_params.set("dbname", "postgres");
conn_t conn{connection_params};
conn_t const conn{connection_params};
conn.exec(R"(DROP DATABASE IF EXISTS "{}")", m_db_name);
} catch (...) {
fprintf(stderr, "DROP DATABASE failed. Ignored.\n");
Expand Down