From 8193b47ceb4c1d2044b6a09f08d795b711704726 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Oct 2019 14:13:40 +0100 Subject: Fix literal booleans --- libmysqlpp/my-column.cpp | 4 ++-- libmysqlpp/my-command.cpp | 4 ++-- libmysqlpp/my-connection.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libmysqlpp/my-column.cpp b/libmysqlpp/my-column.cpp index 403933c..60c8c10 100644 --- a/libmysqlpp/my-column.cpp +++ b/libmysqlpp/my-column.cpp @@ -24,7 +24,7 @@ MySQL::StringColumn::StringColumn(const char * name, unsigned int field, MYSQL_B { b->is_null = &is_null; b->buffer_type = MYSQL_TYPE_STRING; - b->is_unsigned = 0; + b->is_unsigned = false; b->buffer = value.data(); b->buffer_length = len; b->length = &length; @@ -62,7 +62,7 @@ namespace MySQL { { b->is_null = &is_null; b->buffer_type = MT; - b->is_unsigned = 0; + b->is_unsigned = false; b->buffer = &value; b->buffer_length = sizeof(T); } diff --git a/libmysqlpp/my-command.cpp b/libmysqlpp/my-command.cpp index 380d1f9..e15a3c1 100644 --- a/libmysqlpp/my-command.cpp +++ b/libmysqlpp/my-command.cpp @@ -116,7 +116,7 @@ MySQL::Command::bindParamS(unsigned int n, const std::string_view & s) binds[n].buffer = realloc(binds[n].buffer, s.length()); s.copy(static_cast(binds[n].buffer), s.length(), 0); binds[n].buffer_length = s.length(); - binds[n].is_unsigned = 0; + binds[n].is_unsigned = false; } void MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::ptime & v) @@ -132,7 +132,7 @@ MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::ptime & v) ts.minute = v.time_of_day().minutes(); ts.second = v.time_of_day().seconds(); ts.second_part = v.time_of_day().total_microseconds() % 1000000; - ts.neg = 0; + ts.neg = false; } void MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::time_duration & v) diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp index 97924e3..63f4932 100644 --- a/libmysqlpp/my-connection.cpp +++ b/libmysqlpp/my-connection.cpp @@ -87,7 +87,7 @@ MySQL::Connection::~Connection() void MySQL::Connection::beginTxInt() { - if (mysql_autocommit(&conn, 0)) { + if (mysql_autocommit(&conn, false)) { throw Error(&conn); } } -- cgit v1.2.3