mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
General tidy and refactoring:
* Use nullptr (C++11) instead of NULL. * Put each file into its own namespace declaration. * Remove "using namespace" directives and add scope qualifiers. * Control when beast's implementation of std::equal (C++14) is used. * Tidy up some const declarations. Conflicts: src/ripple_app/shamap/SHAMapSync.cpp src/ripple_app/tx/TransactionEngine.cpp
This commit is contained in:
committed by
Vinnie Falco
parent
c581ffb8a4
commit
cad50c68a8
@@ -131,7 +131,7 @@ TER OfferCreateTransactor::takeOffers (
|
||||
WriteLog (lsDEBUG, OfferCreateTransactor) << "takeOffers: bSell: " << bSell << ": against book: " << uBookBase.ToString ();
|
||||
|
||||
LedgerEntrySet& lesActive = mEngine->getNodes ();
|
||||
const uint64 uTakeQuality = STAmount::getRate (saTakerGets, saTakerPays);
|
||||
const beast::uint64 uTakeQuality = STAmount::getRate (saTakerGets, saTakerPays);
|
||||
STAmount saTakerRate = STAmount::setRate (uTakeQuality);
|
||||
const uint160 uTakerPaysAccountID = saTakerPays.getIssuer ();
|
||||
const uint160 uTakerGetsAccountID = saTakerGets.getIssuer ();
|
||||
@@ -153,7 +153,7 @@ TER OfferCreateTransactor::takeOffers (
|
||||
STAmount saTakerFunds = lesActive.accountFunds (uTakerAccountID, saTakerPays);
|
||||
STAmount saSubTakerPays = saTakerPays - saTakerPaid; // How much more to spend.
|
||||
STAmount saSubTakerGets = saTakerGets - saTakerGot; // How much more is wanted.
|
||||
uint64 uTipQuality = bookIterator.getCurrentQuality();
|
||||
beast::uint64 uTipQuality = bookIterator.getCurrentQuality();
|
||||
|
||||
if (!saTakerFunds.isPositive ())
|
||||
{
|
||||
@@ -374,7 +374,7 @@ TER OfferCreateTransactor::takeOffers (
|
||||
TER OfferCreateTransactor::doApply ()
|
||||
{
|
||||
WriteLog (lsTRACE, OfferCreateTransactor) << "OfferCreate> " << mTxn.getJson (0);
|
||||
const uint32 uTxFlags = mTxn.getFlags ();
|
||||
const beast::uint32 uTxFlags = mTxn.getFlags ();
|
||||
const bool bPassive = isSetBit (uTxFlags, tfPassive);
|
||||
const bool bImmediateOrCancel = isSetBit (uTxFlags, tfImmediateOrCancel);
|
||||
const bool bFillOrKill = isSetBit (uTxFlags, tfFillOrKill);
|
||||
@@ -391,12 +391,12 @@ TER OfferCreateTransactor::doApply ()
|
||||
|
||||
const uint160 uPaysIssuerID = saTakerPays.getIssuer ();
|
||||
const uint160 uGetsIssuerID = saTakerGets.getIssuer ();
|
||||
const uint32 uExpiration = mTxn.getFieldU32 (sfExpiration);
|
||||
const beast::uint32 uExpiration = mTxn.getFieldU32 (sfExpiration);
|
||||
const bool bHaveExpiration = mTxn.isFieldPresent (sfExpiration);
|
||||
const bool bHaveCancel = mTxn.isFieldPresent (sfOfferSequence);
|
||||
const uint32 uCancelSequence = mTxn.getFieldU32 (sfOfferSequence);
|
||||
const uint32 uAccountSequenceNext = mTxnAccount->getFieldU32 (sfSequence);
|
||||
const uint32 uSequence = mTxn.getSequence ();
|
||||
const beast::uint32 uCancelSequence = mTxn.getFieldU32 (sfOfferSequence);
|
||||
const beast::uint32 uAccountSequenceNext = mTxnAccount->getFieldU32 (sfSequence);
|
||||
const beast::uint32 uSequence = mTxn.getSequence ();
|
||||
|
||||
const uint256 uLedgerIndex = Ledger::getOfferIndex (mTxnAccountID, uSequence);
|
||||
|
||||
@@ -404,12 +404,12 @@ TER OfferCreateTransactor::doApply ()
|
||||
|
||||
const uint160 uPaysCurrency = saTakerPays.getCurrency ();
|
||||
const uint160 uGetsCurrency = saTakerGets.getCurrency ();
|
||||
const uint64 uRate = STAmount::getRate (saTakerGets, saTakerPays);
|
||||
const beast::uint64 uRate = STAmount::getRate (saTakerGets, saTakerPays);
|
||||
|
||||
TER terResult = tesSUCCESS;
|
||||
uint256 uDirectory; // Delete hints.
|
||||
uint64 uOwnerNode;
|
||||
uint64 uBookNode;
|
||||
beast::uint64 uOwnerNode;
|
||||
beast::uint64 uBookNode;
|
||||
|
||||
LedgerEntrySet& lesActive = mEngine->getNodes ();
|
||||
LedgerEntrySet lesCheckpoint = lesActive; // Checkpoint with just fees paid.
|
||||
|
||||
Reference in New Issue
Block a user