summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-10-08 15:16:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-10-08 15:16:47 +0100
commit05b6da04244e76caa31d4d7e58763faa51911352 (patch)
tree8290efaaae08e668c92e9755d050024a1606b5c3
parentReformat with new clang-format (diff)
downloadlibdbpp-postgresql-05b6da04244e76caa31d4d7e58763faa51911352.tar.bz2
libdbpp-postgresql-05b6da04244e76caa31d4d7e58763faa51911352.tar.xz
libdbpp-postgresql-05b6da04244e76caa31d4d7e58763faa51911352.zip
Anonymous namespace over static
-rw-r--r--libpqpp/pq-connection.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index ee1ddf9..a65d88b 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -18,19 +18,21 @@
NAMEDFACTORY("postgresql", PQ::Connection, DB::ConnectionFactory)
-static void setup() __attribute__((constructor(101)));
-
-static void
-setup()
-{
- // NOLINTNEXTLINE(hicpp-no-array-decay)
- BOOST_ASSERT(PQisthreadsafe() == 1);
- PQinitOpenSSL(1, 0);
-}
+namespace {
+ void setup() __attribute__((constructor(101)));
+
+ void
+ setup()
+ {
+ // NOLINTNEXTLINE(hicpp-no-array-decay)
+ BOOST_ASSERT(PQisthreadsafe() == 1);
+ PQinitOpenSSL(1, 0);
+ }
-static void
-noNoticeProcessor(void *, const char *)
-{
+ void
+ noNoticeProcessor(void *, const char *)
+ {
+ }
}
// NOLINTNEXTLINE(bugprone-throw-keyword-missing)