diff options
Diffstat (limited to 'libsqlitepp')
-rw-r--r-- | libsqlitepp/sqlite-mock.cpp | 2 | ||||
-rw-r--r-- | libsqlitepp/sqlite-mock.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libsqlitepp/sqlite-mock.cpp b/libsqlitepp/sqlite-mock.cpp index 4a96e35..18f7df8 100644 --- a/libsqlitepp/sqlite-mock.cpp +++ b/libsqlitepp/sqlite-mock.cpp @@ -37,7 +37,7 @@ void Mock::DropDatabase() const void Mock::CreateNewDatabase() const { std::filesystem::create_directories(testDbPath.parent_path()); - Mock::openConnection(); // Triggers file creation + (void) Mock::openConnection(); // Triggers file creation } } diff --git a/libsqlitepp/sqlite-mock.h b/libsqlitepp/sqlite-mock.h index cc182d4..45caef9 100644 --- a/libsqlitepp/sqlite-mock.h +++ b/libsqlitepp/sqlite-mock.h @@ -4,6 +4,7 @@ #include <mockDatabase.h> #include <filesystem> #include <visibility.h> +#include <c++11Helpers.h> namespace SQLite { @@ -11,13 +12,15 @@ class DLL_PUBLIC Mock : public DB::MockDatabase { public: Mock(const std::string & root, const std::string & name, const std::vector<std::filesystem::path> & ss); Mock(const std::string & name, const std::vector<std::filesystem::path> & ss); - ~Mock(); + ~Mock() override; + + SPECIAL_MEMBERS_MOVE_RO(Mock); protected: void DropDatabase() const override; void CreateNewDatabase() const override; - DB::ConnectionPtr openConnection() const override; + [[nodiscard]] DB::ConnectionPtr openConnection() const override; private: const std::filesystem::path testDbPath; |