summaryrefslogtreecommitdiff
path: root/libpqpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-10-09 00:57:59 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-10-09 00:57:59 +0100
commit523fc8c9adaa9db4398c0d80db078caa8634cef4 (patch)
treefdbf93e242dde9b2cd54fca794ab84cdb4340d19 /libpqpp
parentAvoid repeated calls to PQunescapeBytea (diff)
downloadlibdbpp-postgresql-523fc8c9adaa9db4398c0d80db078caa8634cef4.tar.bz2
libdbpp-postgresql-523fc8c9adaa9db4398c0d80db078caa8634cef4.tar.xz
libdbpp-postgresql-523fc8c9adaa9db4398c0d80db078caa8634cef4.zip
Replace ifndef/define/endif with pragma onceHEADmain
Diffstat (limited to 'libpqpp')
-rw-r--r--libpqpp/pq-binarycolumn.h5
-rw-r--r--libpqpp/pq-bulkselectcommand.h5
-rw-r--r--libpqpp/pq-column.h5
-rw-r--r--libpqpp/pq-command.h5
-rw-r--r--libpqpp/pq-connection.h5
-rw-r--r--libpqpp/pq-cursorselectcommand.h5
-rw-r--r--libpqpp/pq-error.h5
-rw-r--r--libpqpp/pq-helpers.h5
-rw-r--r--libpqpp/pq-mock.h5
-rw-r--r--libpqpp/pq-modifycommand.h5
-rw-r--r--libpqpp/pq-selectbase.h5
11 files changed, 11 insertions, 44 deletions
diff --git a/libpqpp/pq-binarycolumn.h b/libpqpp/pq-binarycolumn.h
index e44d7e2..0d40c84 100644
--- a/libpqpp/pq-binarycolumn.h
+++ b/libpqpp/pq-binarycolumn.h
@@ -1,5 +1,4 @@
-#ifndef PG_BINARY_COLUMN_H
-#define PG_BINARY_COLUMN_H
+#pragma once
#include "pq-column.h"
@@ -20,5 +19,3 @@ namespace PQ {
template<std::integral T> [[nodiscard]] inline T valueAs() const;
};
}
-
-#endif
diff --git a/libpqpp/pq-bulkselectcommand.h b/libpqpp/pq-bulkselectcommand.h
index 10d4fbf..459ee61 100644
--- a/libpqpp/pq-bulkselectcommand.h
+++ b/libpqpp/pq-bulkselectcommand.h
@@ -1,5 +1,4 @@
-#ifndef PQ_BULKSELECTCOMMAND_H
-#define PQ_BULKSELECTCOMMAND_H
+#pragma once
#include "command_fwd.h"
#include "pq-command.h"
@@ -19,5 +18,3 @@ namespace PQ {
void execute() override;
};
}
-
-#endif
diff --git a/libpqpp/pq-column.h b/libpqpp/pq-column.h
index 4ef102d..dd147ce 100644
--- a/libpqpp/pq-column.h
+++ b/libpqpp/pq-column.h
@@ -1,5 +1,4 @@
-#ifndef PG_COLUMN_H
-#define PG_COLUMN_H
+#pragma once
#include "pq-helpers.h"
#include <column.h>
@@ -34,5 +33,3 @@ namespace PQ {
mutable Buffer buffer;
};
}
-
-#endif
diff --git a/libpqpp/pq-command.h b/libpqpp/pq-command.h
index 4f1f1ea..565bcfb 100644
--- a/libpqpp/pq-command.h
+++ b/libpqpp/pq-command.h
@@ -1,5 +1,4 @@
-#ifndef PQ_COMMAND_H
-#define PQ_COMMAND_H
+#pragma once
#include "command.h"
#include "pq-connection.h"
@@ -81,5 +80,3 @@ namespace PQ {
std::vector<std::unique_ptr<std::string>> bufs;
};
}
-
-#endif
diff --git a/libpqpp/pq-connection.h b/libpqpp/pq-connection.h
index 39f7f2a..b6f77a8 100644
--- a/libpqpp/pq-connection.h
+++ b/libpqpp/pq-connection.h
@@ -1,5 +1,4 @@
-#ifndef PQ_CONNECTION_H
-#define PQ_CONNECTION_H
+#pragma once
#include "command_fwd.h"
#include "pq-error.h"
@@ -54,5 +53,3 @@ namespace PQ {
mutable PreparedStatements preparedStatements;
};
}
-
-#endif
diff --git a/libpqpp/pq-cursorselectcommand.h b/libpqpp/pq-cursorselectcommand.h
index bd46547..23798cd 100644
--- a/libpqpp/pq-cursorselectcommand.h
+++ b/libpqpp/pq-cursorselectcommand.h
@@ -1,5 +1,4 @@
-#ifndef PQ_CURSORSELECTCOMMAND_H
-#define PQ_CURSORSELECTCOMMAND_H
+#pragma once
#include "command_fwd.h"
#include "pq-command.h"
@@ -31,5 +30,3 @@ namespace PQ {
std::string s_close;
};
}
-
-#endif
diff --git a/libpqpp/pq-error.h b/libpqpp/pq-error.h
index ffa47c1..2112977 100644
--- a/libpqpp/pq-error.h
+++ b/libpqpp/pq-error.h
@@ -1,5 +1,4 @@
-#ifndef PQ_ERROR_H
-#define PQ_ERROR_H
+#pragma once
#include "error.h" // IWYU pragma: export
#include <exception.h>
@@ -19,5 +18,3 @@ namespace PQ {
std::string msg;
};
}
-
-#endif
diff --git a/libpqpp/pq-helpers.h b/libpqpp/pq-helpers.h
index 7861d57..4790521 100644
--- a/libpqpp/pq-helpers.h
+++ b/libpqpp/pq-helpers.h
@@ -1,5 +1,4 @@
-#ifndef PQ_HELPERS_H
-#define PQ_HELPERS_H
+#pragma once
#include "libpq-fe.h"
#include <memory>
@@ -15,5 +14,3 @@ namespace PQ {
using ResultPtr = std::unique_ptr<PGresult, pq_deleter<PQclear>>;
}
-
-#endif
diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h
index 2cb6b68..8785e45 100644
--- a/libpqpp/pq-mock.h
+++ b/libpqpp/pq-mock.h
@@ -1,5 +1,4 @@
-#ifndef MOCKPQDATASOURCE_H
-#define MOCKPQDATASOURCE_H
+#pragma once
#include "connection_fwd.h"
#include <c++11Helpers.h>
@@ -29,5 +28,3 @@ namespace PQ {
const int serverVersion;
};
}
-
-#endif
diff --git a/libpqpp/pq-modifycommand.h b/libpqpp/pq-modifycommand.h
index 04938bf..84f35e4 100644
--- a/libpqpp/pq-modifycommand.h
+++ b/libpqpp/pq-modifycommand.h
@@ -1,5 +1,4 @@
-#ifndef PQ_MODIFYCOMMAND_H
-#define PQ_MODIFYCOMMAND_H
+#pragma once
#include "command_fwd.h"
#include "pq-prepared.h"
@@ -16,5 +15,3 @@ namespace PQ {
unsigned int execute(bool) override;
};
}
-
-#endif
diff --git a/libpqpp/pq-selectbase.h b/libpqpp/pq-selectbase.h
index 9d4ff57..f2edaa7 100644
--- a/libpqpp/pq-selectbase.h
+++ b/libpqpp/pq-selectbase.h
@@ -1,5 +1,4 @@
-#ifndef PQ_SELECTBASE_H
-#define PQ_SELECTBASE_H
+#pragma once
#include "pq-command.h"
#include <libpq-fe.h>
@@ -20,5 +19,3 @@ namespace PQ {
bool binary;
};
}
-
-#endif