mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
beast cleanup and tidying:
* Replace custom types with C++11 <cstdint> types * Fix sqlite integer intos and uses * Fix String implicit integer constructors * Escape the enclosing namespace in sqdb * Replace contract checks with assert * Make many header files compile independently * Remove the dependence on beast_core.h in many places * Remove unused or obsolete classes and functions * Remove unused or obsolete macros * Remove unused network functions and files * Remove unused or obsolete classes: - ChildProcess - HighResolutionTimer - InterProcessLock - Throw - TrackedMutex - UntrackedMutex - XmlDocument - XmlElement
This commit is contained in:
@@ -57,8 +57,10 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace sqdb
|
||||
{
|
||||
#include <cassert>
|
||||
|
||||
namespace beast {
|
||||
namespace sqdb {
|
||||
|
||||
transaction::transaction(session& s)
|
||||
: m_session(s), m_bHandled(false)
|
||||
@@ -77,7 +79,7 @@ Error transaction::commit()
|
||||
Error error;
|
||||
|
||||
// already handled
|
||||
check_precondition (!m_bHandled);
|
||||
assert (!m_bHandled);
|
||||
|
||||
// if commit() throws, m_bHandled will remain false
|
||||
// and the destructor will attempt a rollback.
|
||||
@@ -92,10 +94,11 @@ Error transaction::commit()
|
||||
void transaction::rollback()
|
||||
{
|
||||
// already handled
|
||||
check_precondition (!m_bHandled);
|
||||
assert (!m_bHandled);
|
||||
|
||||
m_session.rollback();
|
||||
m_bHandled = true;
|
||||
}
|
||||
|
||||
}
|
||||
} // sqdb
|
||||
} // beast
|
||||
|
||||
Reference in New Issue
Block a user