mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-24 05:52:08 +02:00
cleanup: avoid hidden copies in range-for loops
This commit is contained in:
@@ -69,12 +69,12 @@ void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap &cachedDescendan
|
||||
setAllDescendants.insert(cit);
|
||||
stageEntries.erase(cit);
|
||||
const setEntries &setChildren = GetMemPoolChildren(cit);
|
||||
for (const txiter childEntry : setChildren) {
|
||||
for (txiter childEntry : setChildren) {
|
||||
cacheMap::iterator cacheIt = cachedDescendants.find(childEntry);
|
||||
if (cacheIt != cachedDescendants.end()) {
|
||||
// We've already calculated this one, just add the entries for this set
|
||||
// but don't traverse again.
|
||||
for (const txiter cacheEntry : cacheIt->second) {
|
||||
for (txiter cacheEntry : cacheIt->second) {
|
||||
setAllDescendants.insert(cacheEntry);
|
||||
}
|
||||
} else if (!setAllDescendants.count(childEntry)) {
|
||||
|
||||
Reference in New Issue
Block a user