aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2018-06-15 13:38:54 -0400
committerCory Fields <[email protected]>2018-06-15 13:40:00 -0400
commit466e16e0e8523909f9968c5823691b1d4a3d8175 (patch)
tree13b29dab45a96166b084144cacf86396db8638fc /src/txmempool.cpp
parentMerge #13241: scripted-diff: Avoid temporary copies when looping over std::map (diff)
downloaddiscoin-466e16e0e8523909f9968c5823691b1d4a3d8175.tar.xz
discoin-466e16e0e8523909f9968c5823691b1d4a3d8175.zip
cleanup: avoid hidden copies in range-for loops
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 1c6dba0c9..8090172e3 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -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)) {