File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -654,6 +654,12 @@ class Statement
654
654
Ptr (sqlite3* apSQLite, std::string& aQuery);
655
655
// Copy constructor increments the ref counter
656
656
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
+
657
663
// Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
658
664
~Ptr ();
659
665
Original file line number Diff line number Diff line change @@ -456,6 +456,18 @@ Statement::Ptr::Ptr(const Statement::Ptr& aPtr) :
456
456
++(*mpRefCount);
457
457
}
458
458
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
+
459
471
/* *
460
472
* @brief Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
461
473
*/
You can’t perform that action at this time.
0 commit comments