mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +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:
@@ -366,7 +366,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result, uint32 index)
|
||||
// Entries modified only as a result of building the transaction metadata
|
||||
boost::unordered_map<uint256, SLE::pointer> newMod;
|
||||
|
||||
typedef std::pair<const uint256, LedgerEntrySetEntry> u256_LES_pair;
|
||||
typedef std::map<uint256, LedgerEntrySetEntry>::value_type u256_LES_pair;
|
||||
BOOST_FOREACH(u256_LES_pair& it, mEntries)
|
||||
{
|
||||
SField::ptr type = &sfGeneric;
|
||||
@@ -479,7 +479,7 @@ void LedgerEntrySet::calcRawMeta(Serializer& s, TER result, uint32 index)
|
||||
}
|
||||
|
||||
// add any new modified nodes to the modification set
|
||||
typedef std::pair<const uint256, SLE::pointer> u256_sle_pair;
|
||||
typedef std::map<uint256, SLE::pointer>::value_type u256_sle_pair;
|
||||
BOOST_FOREACH(u256_sle_pair& it, newMod)
|
||||
entryModify(it.second);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user