summaryrefslogtreecommitdiff
path: root/libmysqlpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-03-28 17:54:49 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2020-03-28 17:54:49 +0000
commitef7a2108654dd8afb18fd27f0f84f152f7f796cc (patch)
tree5057132d581f4b3e278e2ca340fcb17203d97c1a /libmysqlpp
parentFixes for tidy (diff)
downloadlibdbpp-mysql-ef7a2108654dd8afb18fd27f0f84f152f7f796cc.tar.bz2
libdbpp-mysql-ef7a2108654dd8afb18fd27f0f84f152f7f796cc.tar.xz
libdbpp-mysql-ef7a2108654dd8afb18fd27f0f84f152f7f796cc.zip
Fixes for tidylibdbpp-mysql-1.4.3
Diffstat (limited to 'libmysqlpp')
-rw-r--r--libmysqlpp/my-error.h4
-rw-r--r--libmysqlpp/my-mock.h7
-rw-r--r--libmysqlpp/unittests/testmysql.cpp4
3 files changed, 10 insertions, 5 deletions
diff --git a/libmysqlpp/my-error.h b/libmysqlpp/my-error.h
index d1dbe68..b48c4a6 100644
--- a/libmysqlpp/my-error.h
+++ b/libmysqlpp/my-error.h
@@ -8,8 +8,8 @@
namespace MySQL {
class Error : public AdHoc::Exception<DB::Error> {
public:
- Error(MYSQL_STMT *);
- Error(MYSQL *);
+ explicit Error(MYSQL_STMT *);
+ explicit Error(MYSQL *);
std::string message() const noexcept override;
private:
diff --git a/libmysqlpp/my-mock.h b/libmysqlpp/my-mock.h
index 60aa124..6be9750 100644
--- a/libmysqlpp/my-mock.h
+++ b/libmysqlpp/my-mock.h
@@ -4,16 +4,19 @@
#include <mockDatabase.h>
#include <filesystem>
#include <visibility.h>
+#include <c++11Helpers.h>
namespace MySQL {
class DLL_PUBLIC Mock : public DB::MockServerDatabase {
public:
Mock(const std::string & master, const std::string & name, const std::vector<std::filesystem::path> & ss);
- ~Mock();
+ ~Mock() override;
+
+ SPECIAL_MEMBERS_MOVE_RO(Mock);
private:
- DB::ConnectionPtr openConnection() const override;
+ [[nodiscard]] DB::ConnectionPtr openConnection() const override;
};
}
diff --git a/libmysqlpp/unittests/testmysql.cpp b/libmysqlpp/unittests/testmysql.cpp
index 7795a0b..17f807e 100644
--- a/libmysqlpp/unittests/testmysql.cpp
+++ b/libmysqlpp/unittests/testmysql.cpp
@@ -147,7 +147,9 @@ BOOST_AUTO_TEST_CASE( errors )
{
auto ro = DB::MockDatabase::openConnectionTo("mysqlmock");
BOOST_REQUIRE_THROW(ro->execute("nonsense"), DB::Error);
- BOOST_REQUIRE_THROW(DB::ConnectionFactory::createNew("mysql", "server=nohost"), DB::ConnectionError);
+ BOOST_REQUIRE_THROW(
+ (void)DB::ConnectionFactory::createNew("mysql", "server=nohost"),
+ DB::ConnectionError);
}
BOOST_AUTO_TEST_SUITE_END();