Merge pull request #157 from hubslave/patch-1

Add a move constructor to Database
This commit is contained in:
Sébastien Rombauts 2019-02-13 09:10:03 +01:00 committed by GitHub
commit 9667c523a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,6 +120,20 @@ public:
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.
*