mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Merge pull request #157 from hubslave/patch-1
Add a move constructor to Database
This commit is contained in:
commit
9667c523a0
@ -120,6 +120,20 @@ public:
|
|||||||
const int aBusyTimeoutMs = 0,
|
const int aBusyTimeoutMs = 0,
|
||||||
const std::string& aVfs = "");
|
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.
|
* @brief Close the SQLite database connection.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user