aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-02-15 23:04:59 +0100
committerRobin Krahl <me@robin-krahl.de>2018-02-15 23:04:59 +0100
commitaa9d554d736604a0716698e803bcd01165ed0773 (patch)
tree01c1e658c0b86cba9564c38f445b70b5edd6286c /src
parent74aec22eb5b02b7878d15627eef4d5a2dcce6b06 (diff)
downloadsqlitepp-aa9d554d736604a0716698e803bcd01165ed0773.tar.gz
sqlitepp-aa9d554d736604a0716698e803bcd01165ed0773.tar.bz2
Use nullptr instead of NULL
Diffstat (limited to 'src')
-rw-r--r--src/sqlitepp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sqlitepp.cpp b/src/sqlitepp.cpp
index 272284b..51bad8d 100644
--- a/src/sqlitepp.cpp
+++ b/src/sqlitepp.cpp
@@ -91,7 +91,7 @@ void Statement::bind(const std::string& name, const int value) {
void Statement::bind(const int index, const std::string& value) {
requireOpen();
handleBindResult(index, sqlite3_bind_text(m_handle, index, value.c_str(),
- value.size(), NULL));
+ value.size(), nullptr));
}
void Statement::bind(const std::string& name, const std::string& value) {
@@ -209,7 +209,7 @@ void Database::open(const std::string& file) {
}
int result = sqlite3_open(file.c_str(), &m_handle);
- if (m_handle == NULL) {
+ if (m_handle == nullptr) {
throw std::runtime_error("sqlitepp::Database::open(std::string&): "
"Can't allocate memory");
}
@@ -227,11 +227,11 @@ std::shared_ptr<Statement> Database::prepare(const std::string& sql) {
requireOpen();
sqlite3_stmt* statementHandle;
int result = sqlite3_prepare_v2(m_handle, sql.c_str(), sql.size(),
- &statementHandle, NULL);
+ &statementHandle, nullptr);
if (result != SQLITE_OK) {
throw DatabaseError(result, sqlite3_errmsg(m_handle));
}
- if (statementHandle == NULL) {
+ if (statementHandle == nullptr) {
throw std::runtime_error("Statement handle is NULL");
}
auto statement = std::shared_ptr<Statement>(new Statement(statementHandle));