summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-07-27 22:46:13 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-07-27 22:46:13 +0100
commitf40e3690b8e8d43a48f5ec3cec0179fda7fc9880 (patch)
treefc0e92fbaa9b761544a24681c88f9a2511497ef6
parentLots of pass by value and perfect forwarding optimisations (diff)
downloadlibdbpp-mysql-f40e3690b8e8d43a48f5ec3cec0179fda7fc9880.tar.bz2
libdbpp-mysql-f40e3690b8e8d43a48f5ec3cec0179fda7fc9880.tar.xz
libdbpp-mysql-f40e3690b8e8d43a48f5ec3cec0179fda7fc9880.zip
Modernize LoadContext initializationHEADlibdbpp-mysql-1.4.7main
-rw-r--r--libmysqlpp/my-connection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp
index 2e63d62..d7e0659 100644
--- a/libmysqlpp/my-connection.cpp
+++ b/libmysqlpp/my-connection.cpp
@@ -145,7 +145,7 @@ MySQL::Connection::modify(const std::string & sql, const DB::CommandOptionsCPtr
namespace MySQL {
class LoadContext : public AdHoc::System::RuntimeContext {
public:
- explicit LoadContext(MYSQL * c) : loadBuf(nullptr), loadBufLen(0), bufOff(0), conn(c), loadReturn(0) { }
+ explicit LoadContext(MYSQL * c) : conn(c) { }
static int
local_infile_init(void ** ptr, const char *, void * ctx)
@@ -188,11 +188,11 @@ namespace MySQL {
loadReturn = mysql_read_query_result(conn);
}
- const char * loadBuf;
- size_t loadBufLen;
- size_t bufOff;
MYSQL * conn;
- int loadReturn;
+ const char * loadBuf {};
+ size_t loadBufLen {};
+ size_t bufOff {};
+ int loadReturn {};
};
}