Skip to content

Commit 9b0a5dd

Browse files
committed
Use const where possible
1 parent 049a43a commit 9b0a5dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/common-import.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class data_t
111111
static std::pair<osmium::item_type, osmium::object_id_type>
112112
get_type_id(std::string const &str)
113113
{
114-
std::string ti(str, 0, str.find(' '));
114+
std::string const ti(str, 0, str.find(' '));
115115
return osmium::string_to_object_id(ti.c_str(),
116116
osmium::osm_entity_bits::nwr);
117117
}

tests/common-pg.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ class tempdb_t
105105
try {
106106
connection_params_t connection_params;
107107
connection_params.set("dbname", "postgres");
108-
conn_t conn{connection_params};
108+
conn_t const conn{connection_params};
109109

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

116-
conn_t local = connect();
116+
conn_t const local = connect();
117117
local.exec("CREATE EXTENSION postgis");
118118
local.exec("CREATE EXTENSION hstore");
119119
init_database_capabilities(local);
@@ -145,7 +145,7 @@ class tempdb_t
145145
try {
146146
connection_params_t connection_params;
147147
connection_params.set("dbname", "postgres");
148-
conn_t conn{connection_params};
148+
conn_t const conn{connection_params};
149149
conn.exec(R"(DROP DATABASE IF EXISTS "{}")", m_db_name);
150150
} catch (...) {
151151
fprintf(stderr, "DROP DATABASE failed. Ignored.\n");

0 commit comments

Comments
 (0)