Change several uses of std::list to alternative containers:

*  Performance motivated.
*  Several of these called size() which is O(N) in gcc-4.8.
*  Remove container copy from LedgerConsensusImp::playbackProposals().
*  Addresses RIPD-284.
This commit is contained in:
Howard Hinnant
2015-03-18 18:47:48 -04:00
committed by Tom Ritchford
parent a61ffab3f9
commit 1979846e5e
12 changed files with 41 additions and 40 deletions

View File

@@ -1891,7 +1891,7 @@ PeerImp::getLedger (std::shared_ptr<protocol::TMGetLedger> const& m)
}
std::vector<SHAMapNodeID> nodeIDs;
std::list< Blob > rawNodes;
std::vector< Blob > rawNodes;
try
{
@@ -1901,7 +1901,7 @@ PeerImp::getLedger (std::shared_ptr<protocol::TMGetLedger> const& m)
p_journal_.trace <<
"GetLedger: getNodeFat got " << rawNodes.size () << " nodes";
std::vector<SHAMapNodeID>::iterator nodeIDIterator;
std::list< Blob >::iterator rawNodeIterator;
std::vector< Blob >::iterator rawNodeIterator;
for (nodeIDIterator = nodeIDs.begin (),
rawNodeIterator = rawNodes.begin ();