summaryrefslogtreecommitdiff
path: root/libsqlitepp/sqlite-command.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-24 13:30:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-24 13:30:22 +0000
commitef16da27477a2a234cab8aed1e072555d6bb410e (patch)
tree540a3ffaa7ade15ef4beca5a786bb9270721ed51 /libsqlitepp/sqlite-command.cpp
parentBring up-to-date with libdbpp. (diff)
downloadlibdbpp-sqlite-ef16da27477a2a234cab8aed1e072555d6bb410e.tar.bz2
libdbpp-sqlite-ef16da27477a2a234cab8aed1e072555d6bb410e.tar.xz
libdbpp-sqlite-ef16da27477a2a234cab8aed1e072555d6bb410e.zip
Bring inline with clang-tidy checks
Diffstat (limited to 'libsqlitepp/sqlite-command.cpp')
-rw-r--r--libsqlitepp/sqlite-command.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libsqlitepp/sqlite-command.cpp b/libsqlitepp/sqlite-command.cpp
index adaf41e..0ae59d1 100644
--- a/libsqlitepp/sqlite-command.cpp
+++ b/libsqlitepp/sqlite-command.cpp
@@ -1,13 +1,14 @@
#include "sqlite-command.h"
#include "sqlite-connection.h"
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
SQLite::Command::Command(const Connection * conn, const std::string & sql) :
DB::Command(sql),
- c(conn)
+ c(conn),
+ stmt(nullptr)
{
- if (sqlite3_prepare_v2(conn->db, sql.c_str(), sql.length(), &stmt, NULL) != SQLITE_OK) {
+ if (sqlite3_prepare_v2(conn->db, sql.c_str(), sql.length(), &stmt, nullptr) != SQLITE_OK) {
throw Error(conn->db);
}
}