Skip to content

Commit cfaa039

Browse files
committed
Miscellaneous const cleanups
1 parent e1631b1 commit cfaa039

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

src/db-check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Check whether the table with the specified name exists in the specified
1919
* schema in the database. Leave schema empty to check in the 'public' schema.
2020
*/
21-
static bool has_table(pg_conn_t &db_connection, std::string const &schema,
21+
static bool has_table(pg_conn_t const &db_connection, std::string const &schema,
2222
std::string const &table)
2323
{
2424
auto const sql = "SELECT count(*) FROM pg_tables"

src/options.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ static char const *program_name(char const *name)
4444
}
4545

4646
namespace {
47-
char const *short_options = "ab:cd:KhlmMp:suvU:WH:P:i:IE:C:S:e:o:O:xkjGz:r:VF:";
48-
const struct option long_options[] = {
47+
char const *const short_options =
48+
"ab:cd:KhlmMp:suvU:WH:P:i:IE:C:S:e:o:O:xkjGz:r:VF:";
49+
50+
struct option const long_options[] = {
4951
{"append", no_argument, nullptr, 'a'},
5052
{"bbox", required_argument, nullptr, 'b'},
5153
{"cache", required_argument, nullptr, 'C'},

tests/test-options-parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "taginfo-impl.hpp"
1616
#include "tagtransform.hpp"
1717

18-
char const *TEST_PBF = "foo.pbf";
18+
char const *const TEST_PBF = "foo.pbf";
1919

2020
static void bad_opt(std::vector<char const *> opts, char const *msg)
2121
{

tests/test-output-flex-way-relation-add.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static testing::db::import_t db;
1616

1717
static char const *const conf_file = "test_output_flex_way.lua";
1818

19-
static const char *const tdata[] = {
19+
static char const *const tdata[] = {
2020
"n10 v1 dV x10.0 y10.0",
2121
"n11 v1 dV x10.0 y10.1",
2222
"n12 v1 dV x10.1 y10.0",

tests/test-pgsql.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "common-import.hpp"
1313
#include "pgsql.hpp"
1414

15-
static testing::db::import_t db;
15+
static testing::db::import_t const db;
1616

1717
TEST_CASE("Tablespace clause with no tablespace")
1818
{

0 commit comments

Comments
 (0)