mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-06 10:46:03 -04:00
Restored Statement move constructor for compatibility with older compilers
This commit is contained in:
parent
27a32521b7
commit
c5b3aa83a2
@ -79,7 +79,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param[in] aStatement Statement to move
|
* @param[in] aStatement Statement to move
|
||||||
*/
|
*/
|
||||||
Statement(Statement&& aStatement) noexcept = default;
|
Statement(Statement&& aStatement) noexcept;
|
||||||
Statement& operator=(Statement&& aStatement) noexcept = default;
|
Statement& operator=(Statement&& aStatement) noexcept = default;
|
||||||
|
|
||||||
// Statement is non-copyable
|
// Statement is non-copyable
|
||||||
|
@ -28,6 +28,21 @@ Statement::Statement(const Database& aDatabase, const char* apQuery) :
|
|||||||
mColumnCount = sqlite3_column_count(mpPreparedStatement.get());
|
mColumnCount = sqlite3_column_count(mpPreparedStatement.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Statement::Statement(Statement&& aStatement) noexcept :
|
||||||
|
mQuery(std::move(aStatement.mQuery)),
|
||||||
|
mpSQLite(aStatement.mpSQLite),
|
||||||
|
mpPreparedStatement(std::move(aStatement.mpPreparedStatement)),
|
||||||
|
mColumnCount(aStatement.mColumnCount),
|
||||||
|
mbHasRow(aStatement.mbHasRow),
|
||||||
|
mbDone(aStatement.mbDone),
|
||||||
|
mColumnNames(std::move(aStatement.mColumnNames))
|
||||||
|
{
|
||||||
|
aStatement.mpSQLite = nullptr;
|
||||||
|
aStatement.mColumnCount = 0;
|
||||||
|
aStatement.mbHasRow = false;
|
||||||
|
aStatement.mbDone = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the statement to make it ready for a new execution (see also #clearBindings() bellow)
|
// Reset the statement to make it ready for a new execution (see also #clearBindings() bellow)
|
||||||
void Statement::reset()
|
void Statement::reset()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user