diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:04 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-11-18 16:55:04 +0000 |
commit | 22e0839fd6912b888b7c3c790573aef1f5df3936 (patch) | |
tree | 5e88e4de68024326b2c59b163dfc1b74a5d4c7f3 /libodbcpp/odbc-error.cpp | |
parent | Fixes for tidy (diff) | |
download | libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.bz2 libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.tar.xz libdbpp-odbc-22e0839fd6912b888b7c3c790573aef1f5df3936.zip |
Clang format
Diffstat (limited to 'libodbcpp/odbc-error.cpp')
-rw-r--r-- | libodbcpp/odbc-error.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libodbcpp/odbc-error.cpp b/libodbcpp/odbc-error.cpp index afa1d42..93f11c0 100644 --- a/libodbcpp/odbc-error.cpp +++ b/libodbcpp/odbc-error.cpp @@ -1,11 +1,12 @@ #include "odbc-error.h" -#include <compileTimeFormatter.h> #include <array> +#include <compileTimeFormatter.h> namespace AdHoc { StreamWriterT('5') { - template<std::size_t l, typename ... Pn> - static void write(stream & s, const std::array<SQLCHAR, l> & sqlstatus, const Pn & ... pn) + template<std::size_t l, typename... Pn> + static void + write(stream & s, const std::array<SQLCHAR, l> & sqlstatus, const Pn &... pn) { static_assert(l > 5); s.write((const char * const)sqlstatus.data(), 5); @@ -21,10 +22,11 @@ AdHocFormatter(ODBCError, "Failed to get diagnostics for return code %?"); ODBC::Error::Error(RETCODE err, SQLSMALLINT handletype, SQLHANDLE handle) { std::array<SQLCHAR, 6> sqlstatus {}; - SQLINTEGER sqlerr; + SQLINTEGER sqlerr; std::array<SQLCHAR, 12800> sqlerrmsg {}; - SQLRETURN rc = SQLGetDiagRec(handletype, handle, 1, sqlstatus.data(), &sqlerr, sqlerrmsg.data(), sqlerrmsg.size(), nullptr); + SQLRETURN rc = SQLGetDiagRec( + handletype, handle, 1, sqlstatus.data(), &sqlerr, sqlerrmsg.data(), sqlerrmsg.size(), nullptr); switch (rc) { case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: @@ -51,4 +53,3 @@ ODBC::Error::message() const noexcept { return msg; } - |