Fixed whitespace issues

This commit is contained in:
AndyLing 2014-09-19 12:00:27 +01:00
parent 4e770eb741
commit bb7a047d52
2 changed files with 15 additions and 14 deletions

View File

@ -362,14 +362,14 @@ public:
return mpStmt; return mpStmt;
} }
int getLastStatus () const int getLastStatus() const
{ {
return mLastStatus ; return mLastStatus;
} }
void setLastStatus (int status) void setLastStatus(int status)
{ {
mLastStatus = status ; mLastStatus = status;
} }
private: private:
@ -378,11 +378,11 @@ public:
/// @} /// @}
private: private:
sqlite3* mpSQLite; //!< Pointer to SQLite Database Connection Handle sqlite3* mpSQLite; //!< Pointer to SQLite Database Connection Handle
sqlite3_stmt* mpStmt; //!< Pointer to SQLite Statement Object sqlite3_stmt* mpStmt; //!< Pointer to SQLite Statement Object
unsigned int* mpRefCount; //!< Pointer to the heap allocated reference counter of the sqlite3_stmt unsigned int* mpRefCount; //!< Pointer to the heap allocated reference counter of the sqlite3_stmt
//!< (to share it with Column objects) //!< (to share it with Column objects)
int mLastStatus;//!< The return status of the last statement evaluation int mLastStatus; //!< The return status of the last statement evaluation
}; };
private: private:

View File

@ -181,8 +181,8 @@ bool Statement::executeStep()
{ {
if (false == mbDone) if (false == mbDone)
{ {
int ret = sqlite3_step(mStmtPtr) ; int ret = sqlite3_step(mStmtPtr);
mStmtPtr.setLastStatus (ret); mStmtPtr.setLastStatus(ret);
if (SQLITE_ROW == ret) // one row is ready : call getColumn(N) to access it if (SQLITE_ROW == ret) // one row is ready : call getColumn(N) to access it
{ {
mbOk = true; mbOk = true;
@ -213,7 +213,7 @@ int Statement::exec()
if (false == mbDone) if (false == mbDone)
{ {
int ret = sqlite3_step(mStmtPtr); int ret = sqlite3_step(mStmtPtr);
mStmtPtr.setLastStatus (ret); mStmtPtr.setLastStatus(ret);
if (SQLITE_DONE == ret) // the statement has finished executing successfully if (SQLITE_DONE == ret) // the statement has finished executing successfully
{ {
mbOk = false; mbOk = false;
@ -276,7 +276,7 @@ bool Statement::isColumnNull(const int aIndex) const
// Check if aRet equal SQLITE_OK, else throw a SQLite::Exception with the SQLite error message // Check if aRet equal SQLITE_OK, else throw a SQLite::Exception with the SQLite error message
void Statement::check(const int aRet) void Statement::check(const int aRet)
{ {
mStmtPtr.setLastStatus (aRet) ; mStmtPtr.setLastStatus(aRet);
if (SQLITE_OK != aRet) if (SQLITE_OK != aRet)
{ {
throw SQLite::Exception(sqlite3_errmsg(mStmtPtr)); throw SQLite::Exception(sqlite3_errmsg(mStmtPtr));
@ -346,7 +346,8 @@ Statement::Ptr::~Ptr() noexcept // nothrow
// as no Statement not Column objet use it anymore // as no Statement not Column objet use it anymore
int ret = sqlite3_finalize(mpStmt); int ret = sqlite3_finalize(mpStmt);
// Never throw an exception in a destructor // Never throw an exception in a destructor
SQLITECPP_ASSERT((SQLITE_OK == ret || mLastStatus == ret), sqlite3_errmsg(mpSQLite)); // See SQLITECPP_ENABLE_ASSERT_HANDLER SQLITECPP_ASSERT((SQLITE_OK == ret || mLastStatus == ret),
sqlite3_errmsg(mpSQLite)); // See SQLITECPP_ENABLE_ASSERT_HANDLER
// and delete the reference counter // and delete the reference counter
delete mpRefCount; delete mpRefCount;