From 1f8b75da47d60ab22c58346e1fea3996bef4c3ac Mon Sep 17 00:00:00 2001 From: program-- Date: Mon, 10 Jul 2023 12:02:22 -0700 Subject: [PATCH] rev: set sqlite move constructor/assignment to default changes per https://github.com/NOAA-OWP/ngen/pull/522#discussion_r1258687723. --- include/geopackage/NGen_SQLite.hpp | 4 ++-- src/geopackage/sqlite/database.cpp | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/include/geopackage/NGen_SQLite.hpp b/include/geopackage/NGen_SQLite.hpp index 191522eef5..eecc999748 100644 --- a/include/geopackage/NGen_SQLite.hpp +++ b/include/geopackage/NGen_SQLite.hpp @@ -179,7 +179,7 @@ class sqlite * * @param db sqlite3 database object */ - sqlite(sqlite&& db); + sqlite(sqlite&& db) = default; /** * Move assignment operator @@ -187,7 +187,7 @@ class sqlite * @param db sqlite3 database object * @return sqlite& reference to sqlite3 database */ - sqlite& operator=(sqlite&& db); + sqlite& operator=(sqlite&& db) = default; /** * Return the originating sqlite3 database pointer diff --git a/src/geopackage/sqlite/database.cpp b/src/geopackage/sqlite/database.cpp index 4fdb0f6cd1..20bc07e5ee 100644 --- a/src/geopackage/sqlite/database.cpp +++ b/src/geopackage/sqlite/database.cpp @@ -36,19 +36,6 @@ sqlite::sqlite(const std::string& path) this->conn = sqlite_t(conn); } -sqlite::sqlite(sqlite&& db) -{ - this->conn = std::move(db.conn); - this->stmt = db.stmt; -} - -sqlite& sqlite::operator=(sqlite&& db) -{ - this->conn = std::move(db.conn); - this->stmt = db.stmt; - return *this; -} - sqlite3* sqlite::connection() const noexcept { return this->conn.get();