Skip to content

Commit

Permalink
Merge pull request #157 from hubslave/patch-1
Browse files Browse the repository at this point in the history
Add a move constructor to Database
  • Loading branch information
SRombauts authored Feb 13, 2019
2 parents 8901553 + 65f719d commit 9667c52
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/SQLiteCpp/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ class Database
const int aBusyTimeoutMs = 0,
const std::string& aVfs = "");

#if __cplusplus >= 201103L
/**
* @brief Move an SQLite database connection.
*
* @param[in] aDb Database to move
*/
inline Database(Database&& aDb) noexcept :
mpSQLite(aDb.mpSQLite),
mFilename(std::move(aDb.mFilename))
{
aDb.mpSQLite = nullptr;
}
#endif

/**
* @brief Close the SQLite database connection.
*
Expand Down

0 comments on commit 9667c52

Please sign in to comment.