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:
Vinnie Falco
2014-03-22 09:43:11 -07:00
parent 936f45c7ec
commit b2d97703c6
440 changed files with 3139 additions and 9643 deletions

View File

@@ -33,8 +33,8 @@ TER TrustSetTransactor::doApply ()
uint160 uDstAccountID = saLimitAmount.getIssuer ();
const bool bHigh = mTxnAccountID > uDstAccountID; // true, iff current is high account.
beast::uint32 uQualityIn = bQualityIn ? mTxn.getFieldU32 (sfQualityIn) : 0;
beast::uint32 uQualityOut = bQualityOut ? mTxn.getFieldU32 (sfQualityOut) : 0;
std::uint32_t uQualityIn = bQualityIn ? mTxn.getFieldU32 (sfQualityIn) : 0;
std::uint32_t uQualityOut = bQualityOut ? mTxn.getFieldU32 (sfQualityOut) : 0;
if (!saLimitAmount.isLegalNet ())
return temBAD_AMOUNT;
@@ -45,7 +45,7 @@ TER TrustSetTransactor::doApply ()
if (bQualityOut && QUALITY_ONE == uQualityOut)
uQualityOut = 0;
const beast::uint32 uTxFlags = mTxn.getFlags ();
const std::uint32_t uTxFlags = mTxn.getFlags ();
if (uTxFlags & tfTrustSetMask)
{
@@ -115,9 +115,9 @@ TER TrustSetTransactor::doApply ()
return tecNO_DST;
}
const beast::uint32 uOwnerCount = mTxnAccount->getFieldU32 (sfOwnerCount);
const std::uint32_t uOwnerCount = mTxnAccount->getFieldU32 (sfOwnerCount);
// The reserve required to create the line.
const beast::uint64 uReserveCreate = (uOwnerCount < 2) ? 0 : mEngine->getLedger ()->getReserve (uOwnerCount + 1);
const std::uint64_t uReserveCreate = (uOwnerCount < 2) ? 0 : mEngine->getLedger ()->getReserve (uOwnerCount + 1);
STAmount saLimitAllow = saLimitAmount;
saLimitAllow.setIssuer (mTxnAccountID);
@@ -130,10 +130,10 @@ TER TrustSetTransactor::doApply ()
STAmount saLowLimit;
STAmount saHighBalance;
STAmount saHighLimit;
beast::uint32 uLowQualityIn;
beast::uint32 uLowQualityOut;
beast::uint32 uHighQualityIn;
beast::uint32 uHighQualityOut;
std::uint32_t uLowQualityIn;
std::uint32_t uLowQualityOut;
std::uint32_t uHighQualityIn;
std::uint32_t uHighQualityOut;
const uint160& uLowAccountID = !bHigh ? mTxnAccountID : uDstAccountID;
const uint160& uHighAccountID = bHigh ? mTxnAccountID : uDstAccountID;
SLE::ref sleLowAccount = !bHigh ? mTxnAccount : sleDst;
@@ -219,8 +219,8 @@ TER TrustSetTransactor::doApply ()
uHighQualityOut = bHigh ? 0 : sleRippleState->getFieldU32 (sfHighQualityOut);
}
const beast::uint32 uFlagsIn = sleRippleState->getFieldU32 (sfFlags);
beast::uint32 uFlagsOut = uFlagsIn;
const std::uint32_t uFlagsIn = sleRippleState->getFieldU32 (sfFlags);
std::uint32_t uFlagsOut = uFlagsIn;
if (bSetNoRipple && !bClearNoRipple && (bHigh ? saHighBalance : saLowBalance).isGEZero())
{