Various cleanups:

* Replace SYSTEM_NAME and other macros with C++ constructs
* Remove RIPPLE_ARRAYSIZE and use std::extent or ranged for loops
* Remove old-style, unused offer crossing unit test
* Make STAmount::saFromRate free and remove default argument
This commit is contained in:
Nik Bougalis
2014-12-04 03:16:41 -08:00
parent 8e792855e0
commit 4a49fefdd9
27 changed files with 305 additions and 1152 deletions

View File

@@ -230,7 +230,7 @@ TER RippleCalc::rippleCalculate ()
<< "rippleCalc: AFTER:"
<< " mIndex=" << pathState->index()
<< " uQuality=" << pathState->quality()
<< " rate=" << STAmount::saFromRate (pathState->quality());
<< " rate=" << amountFromRate (pathState->quality());
if (!pathState->quality())
{
@@ -257,7 +257,7 @@ TER RippleCalc::rippleCalculate ()
lsDEBUG, RippleCalc)
<< "rippleCalc: better:"
<< " uQuality="
<< STAmount::saFromRate (pathState->quality())
<< amountFromRate (pathState->quality())
<< " inPass()=" << pathState->inPass()
<< " saOutPass=" << pathState->outPass();
@@ -278,7 +278,7 @@ TER RippleCalc::rippleCalculate ()
<< " mIndex=" << pathState->index()
<< " uQuality=" << pathState->quality()
<< " rate="
<< STAmount::saFromRate (pathState->quality())
<< amountFromRate (pathState->quality())
<< " inPass()=" << pathState->inPass()
<< " saOutPass=" << pathState->outPass();
@@ -306,7 +306,7 @@ TER RippleCalc::rippleCalculate ()
<< "rippleCalc: "
<< "Summary: " << pathState->index()
<< " rate: "
<< STAmount::saFromRate (pathState->quality())
<< amountFromRate (pathState->quality())
<< " quality:" << pathState->quality()
<< " best: " << (iBest == pathState->index ());
}
@@ -320,7 +320,7 @@ TER RippleCalc::rippleCalculate ()
WriteLog (lsDEBUG, RippleCalc)
<< "rippleCalc: best:"
<< " uQuality="
<< STAmount::saFromRate (pathState->quality())
<< amountFromRate (pathState->quality())
<< " inPass()=" << pathState->inPass()
<< " saOutPass=" << pathState->outPass();

View File

@@ -52,7 +52,7 @@ TER PathCursor::reverseLiquidity () const
// a fee when third parties transfer that account's own issuances.
// node.transferRate_ caches the output transfer rate for this node.
node().transferRate_ = STAmount::saFromRate (
node().transferRate_ = amountFromRate (
rippleTransferRate (ledger(), node().issue_.account));
if (node().isAccount ())

View File

@@ -205,7 +205,7 @@ TER PathCursor::reverseLiquidityForAccount () const
<< " (available) previousNode.saRevRedeem="
<< previousNode().saRevRedeem
<< " uRateMax="
<< STAmount::saFromRate (uRateMax).getText ();
<< amountFromRate (uRateMax).getText ();
}
else
{