From f8bc7799183c32bf1bbd23900aa297753517d7cb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Oct 2019 12:53:57 +0100 Subject: Modernize build --- libmysqlpp/Jamfile.jam | 5 ++--- libmysqlpp/my-connection.cpp | 2 +- libmysqlpp/my-connection.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'libmysqlpp') diff --git a/libmysqlpp/Jamfile.jam b/libmysqlpp/Jamfile.jam index 4ba2902..486f77b 100644 --- a/libmysqlpp/Jamfile.jam +++ b/libmysqlpp/Jamfile.jam @@ -1,6 +1,5 @@ import package ; -lib mysqlclient : : : : /usr/include/mysql ; lib adhocutil : : : : /usr/include/adhocutil ; lib dbppcore : : : : /usr/include/dbpp ; lib boost_date_time ; @@ -8,13 +7,13 @@ lib boost_date_time ; lib dbpp-mysql : [ glob my-*.cpp ] : ..//glibmm - mysqlclient + ..//mysqlclient dbppcore adhocutil boost_date_time : : . - mysqlclient + ..//mysqlclient ..//glibmm dbppcore ; diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp index e5193ac..97924e3 100644 --- a/libmysqlpp/my-connection.cpp +++ b/libmysqlpp/my-connection.cpp @@ -200,7 +200,7 @@ MySQL::Connection::beginBulkUpload(const char * table, const char * extra) auto sql = MySQLConnectionLoadData::get(table, extra); mysql_send_query(&conn, sql.c_str(), sql.length()); - ctx = boost::shared_ptr(new MySQL::LoadContext(&conn)); + ctx = std::make_unique(&conn); mysql_set_local_infile_handler(&conn, LoadContext::local_infile_init, LoadContext::local_infile_read, LoadContext::local_infile_end, LoadContext::local_infile_error, ctx.get()); diff --git a/libmysqlpp/my-connection.h b/libmysqlpp/my-connection.h index 7e89876..21b98b0 100644 --- a/libmysqlpp/my-connection.h +++ b/libmysqlpp/my-connection.h @@ -4,7 +4,7 @@ #include #include "my-error.h" #include -#include +#include namespace MySQL { class ConnectionError : public virtual Error, public virtual DB::ConnectionError { @@ -38,7 +38,7 @@ namespace MySQL { mutable MYSQL conn; private: - mutable boost::shared_ptr ctx; + mutable std::unique_ptr ctx; }; } -- cgit v1.2.3