Skip to content

Commit

Permalink
rev: delete sqlite copy constructor/assignment
Browse files Browse the repository at this point in the history
Copy constructor/assignment operator are not used for the `sqlite`
class, and should subsequently be deleted. This change is implemented
per NOAA-OWP#522 (comment).
  • Loading branch information
program-- committed Jul 10, 2023
1 parent 49bd6d9 commit 071e8f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
5 changes: 3 additions & 2 deletions include/geopackage/NGen_SQLite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ class sqlite
*/
sqlite(const std::string& path);

sqlite(sqlite& db);
sqlite& operator=(sqlite& db);
sqlite(sqlite& db) = delete;

sqlite& operator=(sqlite& db) = delete;

/**
* Take ownership of a sqlite3 database
Expand Down
13 changes: 0 additions & 13 deletions src/geopackage/sqlite/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

sqlite::sqlite(sqlite&& db)
{
this->conn = std::move(db.conn);
Expand Down

0 comments on commit 071e8f8

Please sign in to comment.