diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-04 19:48:20 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-04 19:48:20 +0100 |
commit | 3526af7ec50e46aaa73d038566f42554f70f27b0 (patch) | |
tree | 2591708ced4743213f77c9aa4ee8933dc0d1b333 /libpqpp/pq-command.h | |
parent | Pedantic only with gcc (diff) | |
download | libdbpp-postgresql-1.4.10.tar.bz2 libdbpp-postgresql-1.4.10.tar.xz libdbpp-postgresql-1.4.10.zip |
Fix a lot of clang-tidy warningsHEADlibdbpp-postgresql-1.4.10main
Diffstat (limited to 'libpqpp/pq-command.h')
-rw-r--r-- | libpqpp/pq-command.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/libpqpp/pq-command.h b/libpqpp/pq-command.h index 565bcfb..cfc7ed5 100644 --- a/libpqpp/pq-command.h +++ b/libpqpp/pq-command.h @@ -1,35 +1,30 @@ #pragma once #include "command.h" -#include "pq-connection.h" -#include <memory> -#include <vector> -#include <visibility.h> -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wold-style-cast" -#pragma GCC diagnostic ignored "-Wsign-conversion" -#ifndef __clang__ -# pragma GCC diagnostic ignored "-Wuseless-cast" -#endif -#include <glibmm/ustring.h> -#pragma GCC diagnostic pop #include "command_fwd.h" +#include "pq-connection.h" #include <boost/date_time/posix_time/posix_time.hpp> #include <cstddef> +#include <glibmm/ustring.h> #include <iosfwd> +#include <memory> #include <string> #include <string_view> +#include <vector> +#include <visibility.h> namespace DB { class Blob; } namespace PQ { + constexpr unsigned int DEFAULT_FETCH_TUPLES = 35; + class DLL_PUBLIC CommandOptions : public DB::CommandOptions { public: CommandOptions(std::size_t, const DB::CommandOptionsMap &); - explicit CommandOptions( - std::size_t hash, unsigned int fetchTuples = 35, bool useCursor = true, bool fetchBinary = false); + explicit CommandOptions(std::size_t hash, unsigned int fetchTuples = DEFAULT_FETCH_TUPLES, + bool useCursor = true, bool fetchBinary = false); unsigned int fetchTuples; bool useCursor; @@ -72,8 +67,8 @@ namespace PQ { Connection * const c; void paramsAtLeast(unsigned int); - template<typename... T> void paramSet(unsigned int, T &&... t); - void paramSet(unsigned int, const std::string_view); + template<typename... T> void paramSet(unsigned int, T &&...); + void paramSet(unsigned int, std::string_view); std::vector<const char *> values; std::vector<int> lengths; std::vector<int> formats; |