[core] Fix performance-noexcept-move-constructor errors

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-20 12:38:09 +02:00
parent 6223fc2898
commit 991cfee7df
2 changed files with 4 additions and 5 deletions

View File

@@ -79,9 +79,9 @@ public:
static mapbox::util::variant<Database, Exception> tryOpen(const std::string &filename, int flags = 0);
static Database open(const std::string &filename, int flags = 0);
Database(Database &&);
Database(Database&&) noexcept;
~Database();
Database &operator=(Database &&);
Database& operator=(Database&&) noexcept;
void setBusyTimeout(std::chrono::milliseconds);
void exec(const std::string &sql);

View File

@@ -144,10 +144,9 @@ Database::Database(std::unique_ptr<DatabaseImpl> impl_)
: impl(std::move(impl_))
{}
Database::Database(Database &&other)
: impl(std::move(other.impl)) {}
Database::Database(Database&& other) noexcept : impl(std::move(other.impl)) {}
Database &Database::operator=(Database &&other) {
Database& Database::operator=(Database&& other) noexcept {
std::swap(impl, other.impl);
return *this;
}