mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Remove unfinished Statement move constructor from PR #86
- see comments in code: needs a move constructor on Statement::Ptr
This commit is contained in:
parent
bcdbea2cf8
commit
e7384b30a8
@ -68,17 +68,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
Statement(Database& aDatabase, const std::string& aQuery);
|
Statement(Database& aDatabase, const std::string& aQuery);
|
||||||
|
|
||||||
#if (__cplusplus >= 201103L) || ( defined(_MSC_VER) && (_MSC_VER >= 1600) ) // C++11: Visual Studio 2010
|
|
||||||
/**
|
|
||||||
* @brief Move Constructor
|
|
||||||
*
|
|
||||||
* Allows inserting into STL containers that may need to move memory when growing.
|
|
||||||
*
|
|
||||||
* @param aOther Statement to move to
|
|
||||||
*/
|
|
||||||
Statement(Statement&& aOther);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Finalize and unregister the SQL query from the SQLite Database Connection.
|
* @brief Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
*/
|
*/
|
||||||
|
@ -43,22 +43,6 @@ Statement::Statement(Database &aDatabase, const std::string& aQuery) :
|
|||||||
mColumnCount = sqlite3_column_count(mStmtPtr);
|
mColumnCount = sqlite3_column_count(mStmtPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (__cplusplus >= 201103L) || ( defined(_MSC_VER) && (_MSC_VER >= 1600) ) // C++11: Visual Studio 2010
|
|
||||||
// Move Constructor
|
|
||||||
Statement::Statement(Statement&& aOther):
|
|
||||||
mQuery(std::move(aOther.mQuery)),
|
|
||||||
mStmtPtr(aOther.mStmtPtr), // TODO: need a move operator
|
|
||||||
mColumnCount(aOther.mColumnCount),
|
|
||||||
mColumnNames(std::move(aOther.mColumnNames)),
|
|
||||||
mbOk(aOther.mbOk),
|
|
||||||
mbDone(aOther.mbDone)
|
|
||||||
{
|
|
||||||
// other.mStmtPtr = nullptr; // doesn't support reassigning
|
|
||||||
other.mColumnCount = 0;
|
|
||||||
other.mbOk = false;
|
|
||||||
other.mbDone = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
Statement::~Statement() noexcept // nothrow
|
Statement::~Statement() noexcept // nothrow
|
||||||
|
Loading…
x
Reference in New Issue
Block a user