File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -654,6 +654,12 @@ class Statement
654654 Ptr (sqlite3* apSQLite, std::string& aQuery);
655655 // Copy constructor increments the ref counter
656656 Ptr (const Ptr& aPtr);
657+
658+ #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
659+ // Move constructor
660+ Ptr (Ptr&& aPtr);
661+ #endif
662+
657663 // Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
658664 ~Ptr ();
659665
Original file line number Diff line number Diff line change @@ -456,6 +456,18 @@ Statement::Ptr::Ptr(const Statement::Ptr& aPtr) :
456456 ++(*mpRefCount);
457457}
458458
459+ #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
460+ Statement::Ptr::Ptr (Ptr&& aPtr) :
461+ mpSQLite(aPtr.mpSQLite),
462+ mpStmt(aPtr.mpStmt),
463+ mpRefCount(aPtr.mpRefCount)
464+ {
465+ aPtr.mpSQLite = NULL ;
466+ aPtr.mpStmt = NULL ;
467+ aPtr.mpRefCount = NULL ;
468+ }
469+ #endif
470+
459471/* *
460472 * @brief Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
461473 */
You can’t perform that action at this time.
0 commit comments