aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-06-01 11:48:29 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-06-01 11:48:29 -0400
commitb9b814a38ee768ec8a902544722b81c4b9866834 (patch)
treee799ab93b1b94dded70b76d5680078dd7b6818f3 /src
parent7e96ecf075e8633f83ed1e05052402fb6b4d6186 (diff)
downloadbitcoin-b9b814a38ee768ec8a902544722b81c4b9866834.tar.xz
Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 997515a04b..62d46ba72b 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
{
LOCK(cs_wallet);
- BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
+ for (const auto& walletEntry : mapWallet)
{
- CWalletTx *pcoin = &walletEntry.second;
+ const CWalletTx *pcoin = &walletEntry.second;
if (!pcoin->IsTrusted())
continue;
@@ -3301,9 +3301,9 @@ std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
std::set< std::set<CTxDestination> > groupings;
std::set<CTxDestination> grouping;
- BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
+ for (const auto& walletEntry : mapWallet)
{
- CWalletTx *pcoin = &walletEntry.second;
+ const CWalletTx *pcoin = &walletEntry.second;
if (pcoin->tx->vin.size() > 0)
{