Miscellaneous const cleanups

This commit is contained in:
Jochen Topf
2021-05-26 16:24:41 +02:00
parent e1631b1bf6
commit cfaa0391d9
5 changed files with 8 additions and 6 deletions

View File

@ -18,7 +18,7 @@
* Check whether the table with the specified name exists in the specified
* schema in the database. Leave schema empty to check in the 'public' schema.
*/
static bool has_table(pg_conn_t &db_connection, std::string const &schema,
static bool has_table(pg_conn_t const &db_connection, std::string const &schema,
std::string const &table)
{
auto const sql = "SELECT count(*) FROM pg_tables"

View File

@ -44,8 +44,10 @@ static char const *program_name(char const *name)
}
namespace {
char const *short_options = "ab:cd:KhlmMp:suvU:WH:P:i:IE:C:S:e:o:O:xkjGz:r:VF:";
const struct option long_options[] = {
char const *const short_options =
"ab:cd:KhlmMp:suvU:WH:P:i:IE:C:S:e:o:O:xkjGz:r:VF:";
struct option const long_options[] = {
{"append", no_argument, nullptr, 'a'},
{"bbox", required_argument, nullptr, 'b'},
{"cache", required_argument, nullptr, 'C'},

View File

@ -15,7 +15,7 @@
#include "taginfo-impl.hpp"
#include "tagtransform.hpp"
char const *TEST_PBF = "foo.pbf";
char const *const TEST_PBF = "foo.pbf";
static void bad_opt(std::vector<char const *> opts, char const *msg)
{

View File

@ -16,7 +16,7 @@ static testing::db::import_t db;
static char const *const conf_file = "test_output_flex_way.lua";
static const char *const tdata[] = {
static char const *const tdata[] = {
"n10 v1 dV x10.0 y10.0",
"n11 v1 dV x10.0 y10.1",
"n12 v1 dV x10.1 y10.0",

View File

@ -12,7 +12,7 @@
#include "common-import.hpp"
#include "pgsql.hpp"
static testing::db::import_t db;
static testing::db::import_t const db;
TEST_CASE("Tablespace clause with no tablespace")
{