summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-20 12:38:09 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-23 12:09:09 +0200
commit991cfee7df24acf50893c669d3a135e474945e97 (patch)
treef6235b61a0fdd857d65f4b2ef5a75113087b90b2 /platform
parent6223fc2898949eb1228b91da26dc4a1997a83c58 (diff)
downloadqtlocation-mapboxgl-991cfee7df24acf50893c669d3a135e474945e97.tar.gz
[core] Fix performance-noexcept-move-constructor errors
As reported by clang-tidy-8.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/include/mbgl/storage/sqlite3.hpp4
-rw-r--r--platform/default/src/mbgl/storage/sqlite3.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/platform/default/include/mbgl/storage/sqlite3.hpp b/platform/default/include/mbgl/storage/sqlite3.hpp
index 44dc746075..9da98daf25 100644
--- a/platform/default/include/mbgl/storage/sqlite3.hpp
+++ b/platform/default/include/mbgl/storage/sqlite3.hpp
@@ -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);
diff --git a/platform/default/src/mbgl/storage/sqlite3.cpp b/platform/default/src/mbgl/storage/sqlite3.cpp
index 522210f88f..3eb5194e2c 100644
--- a/platform/default/src/mbgl/storage/sqlite3.cpp
+++ b/platform/default/src/mbgl/storage/sqlite3.cpp
@@ -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;
}