From feb2378b5a1b3e426304c7ef168684b4fe620210 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 9 Jun 2015 23:53:12 +0900 Subject: [PATCH] Optimised fors in State. --- libethereum/State.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libethereum/State.cpp b/libethereum/State.cpp index cb514e8f8..1212c2d74 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -226,21 +226,21 @@ StateDiff State::diff(State const& _c, bool _quick) const } else { - for (auto i: trie) + for (auto const& i: trie) ads.insert(i.first), trieAds.insert(i.first); - for (auto i: trieD) + for (auto const& i: trieD) ads.insert(i.first), trieAdsD.insert(i.first); } - for (auto i: m_cache) + for (auto const& i: m_cache) ads.insert(i.first); - for (auto i: _c.m_cache) + for (auto const& i: _c.m_cache) ads.insert(i.first); // cnote << *this; // cnote << _c; - for (auto i: ads) + for (auto const& i: ads) { auto it = m_cache.find(i); auto itD = _c.m_cache.find(i);