diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 15:29:12 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 15:29:12 +0000 |
commit | 881033464c13398f78be306d8d785616f0947896 (patch) | |
tree | 38a3a320b5dd90a0b377a1b69735546c3ed84057 /libodbcpp/odbc-column.cpp | |
parent | Update to new libdbpp interface (diff) | |
download | libdbpp-odbc-881033464c13398f78be306d8d785616f0947896.tar.bz2 libdbpp-odbc-881033464c13398f78be306d8d785616f0947896.tar.xz libdbpp-odbc-881033464c13398f78be306d8d785616f0947896.zip |
Bring inline with clang-tidy checks
Diffstat (limited to 'libodbcpp/odbc-column.cpp')
-rw-r--r-- | libodbcpp/odbc-column.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/libodbcpp/odbc-column.cpp b/libodbcpp/odbc-column.cpp index f51aad5..2a25f9b 100644 --- a/libodbcpp/odbc-column.cpp +++ b/libodbcpp/odbc-column.cpp @@ -1,6 +1,6 @@ #include <sqlext.h> -#include <stdio.h> -#include <stdlib.h> +#include <cstdio> +#include <cstdlib> #include "odbc-column.h" #include "odbc-command.h" #include "odbc-selectcommand.h" @@ -13,10 +13,6 @@ ODBC::Column::Column(SelectCommand * sc, const Glib::ustring & s, unsigned int i bindLen = 0; } -ODBC::Column::~Column() -{ -} - bool ODBC::Column::resize() { @@ -69,30 +65,40 @@ ODBC::IntervalColumn::operator boost::posix_time::time_duration() const void ODBC::SignedIntegerColumn::apply(DB::HandleField & h) const { - if (isNull()) return h.null(); + if (isNull()) { + return h.null(); + } h.integer(data); } void ODBC::FloatingPointColumn::apply(DB::HandleField & h) const { - if (isNull()) return h.null(); + if (isNull()) { + return h.null(); + } h.floatingpoint(data); } void ODBC::CharArrayColumn::apply(DB::HandleField & h) const { - if (isNull()) return h.null(); + if (isNull()) { + return h.null(); + } h.string({ data.data(), (std::size_t)bindLen }); } void ODBC::TimeStampColumn::apply(DB::HandleField & h) const { - if (isNull()) return h.null(); + if (isNull()) { + return h.null(); + } h.timestamp(*this); } void ODBC::IntervalColumn::apply(DB::HandleField & h) const { - if (isNull()) return h.null(); + if (isNull()) { + return h.null(); + } h.interval(*this); } |