mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 13:05:53 +00:00
Round one of fixes to avoid ridiculous numbers of spurious copy constructor and destructor calls.
Most of these fixes involve calls to BOOST_FOREACH to iterate over a map or unordered_map where the iterator type didn't perfectly match the internal type, so a reference into the map couldn't be created and a new value/content pair had to be created for each iteration.
This commit is contained in:
@@ -570,7 +570,7 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
|
||||
{
|
||||
boost::unordered_map<uint256, currentValidationCount> current =
|
||||
theApp->getValidations().getCurrentValidations(closedLedger);
|
||||
typedef std::pair<const uint256, currentValidationCount> u256_cvc_pair;
|
||||
typedef std::map<uint256, currentValidationCount>::value_type u256_cvc_pair;
|
||||
BOOST_FOREACH(u256_cvc_pair& it, current)
|
||||
{
|
||||
ValidationCount& vc = ledgers[it.first];
|
||||
@@ -1152,8 +1152,8 @@ void NetworkOPs::pubAccountTransaction(Ledger::ref lpCurrent, const SerializedTr
|
||||
|
||||
if (!mSubAccount.empty() || (!mSubRTAccount.empty()) )
|
||||
{
|
||||
typedef const std::pair<RippleAddress,bool> AccountPair;
|
||||
BOOST_FOREACH(AccountPair& affectedAccount, getAffectedAccounts(stTxn))
|
||||
typedef std::map<RippleAddress, bool>::value_type AccountPair;
|
||||
BOOST_FOREACH(const AccountPair& affectedAccount, getAffectedAccounts(stTxn))
|
||||
{
|
||||
subInfoMapIterator simiIt = mSubRTAccount.find(affectedAccount.first.getAccountID());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user