Skip to content

Commit 098b01d

Browse files
committed
Merge #10500: Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
b9b814a Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings (Russell Yanofsky) Tree-SHA512: 96a0612ca460ba1bfb3921f3aa348400fd3afa12c40f2ca1f3f04068b1574fe824d577e0123013d8898a4990084316dc1dfb541331849f0996ceff7f4eb25e6b
2 parents 329fc1d + b9b814a commit 098b01d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
32613261

32623262
{
32633263
LOCK(cs_wallet);
3264-
BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
3264+
for (const auto& walletEntry : mapWallet)
32653265
{
3266-
CWalletTx *pcoin = &walletEntry.second;
3266+
const CWalletTx *pcoin = &walletEntry.second;
32673267

32683268
if (!pcoin->IsTrusted())
32693269
continue;
@@ -3301,9 +3301,9 @@ std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
33013301
std::set< std::set<CTxDestination> > groupings;
33023302
std::set<CTxDestination> grouping;
33033303

3304-
BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
3304+
for (const auto& walletEntry : mapWallet)
33053305
{
3306-
CWalletTx *pcoin = &walletEntry.second;
3306+
const CWalletTx *pcoin = &walletEntry.second;
33073307

33083308
if (pcoin->tx->vin.size() > 0)
33093309
{

0 commit comments

Comments
 (0)