diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -1105,7 +1105,7 @@ // a separate counter. Once we hit a gap (or if 0 doesn't exist) start // removing block files. int nContigCounter = 0; - for (const std::pair &item : mapBlockFiles) { + for (const std::pair &item : mapBlockFiles) { if (atoi(item.first) == nContigCounter) { nContigCounter++; continue; diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -596,7 +596,8 @@ UniValue localAddresses(UniValue::VARR); { LOCK(cs_mapLocalHost); - for (const std::pair &item : mapLocalHost) { + for (const std::pair &item : + mapLocalHost) { UniValue rec(UniValue::VOBJ); rec.pushKV("address", item.first.ToString()); rec.pushKV("port", item.second.nPort); diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4373,7 +4373,7 @@ // Calculate nChainWork std::vector> vSortedByHeight; vSortedByHeight.reserve(mapBlockIndex.size()); - for (const std::pair &item : mapBlockIndex) { + for (const std::pair &item : mapBlockIndex) { CBlockIndex *pindex = item.second; vSortedByHeight.push_back(std::make_pair(pindex->nHeight, pindex)); } @@ -4466,7 +4466,7 @@ // Check presence of blk files LogPrintf("Checking all blk files are present...\n"); std::set setBlkDataFiles; - for (const std::pair &item : mapBlockIndex) { + for (const std::pair &item : mapBlockIndex) { CBlockIndex *pindex = item.second; if (pindex->nStatus.hasData()) { setBlkDataFiles.insert(pindex->nFile); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -133,7 +133,7 @@ entry.pushKV("time", wtx.GetTxTime()); entry.pushKV("timereceived", (int64_t)wtx.nTimeReceived); - for (const std::pair &item : wtx.mapValue) { + for (const std::pair &item : wtx.mapValue) { entry.pushKV(item.first, item.second); } } @@ -444,7 +444,7 @@ // Find all addresses that have the given account UniValue ret(UniValue::VARR); - for (const std::pair &item : + for (const std::pair &item : pwallet->mapAddressBook) { const CTxDestination &dest = item.first; const std::string &strName = item.second.name; @@ -804,7 +804,8 @@ // Tally Amount nAmount = Amount::zero(); - for (const std::pair &pairWtx : pwallet->mapWallet) { + for (const std::pair &pairWtx : + pwallet->mapWallet) { const CWalletTx &wtx = pairWtx.second; CValidationState state; @@ -878,7 +879,8 @@ // Tally Amount nAmount = Amount::zero(); - for (const std::pair &pairWtx : pwallet->mapWallet) { + for (const std::pair &pairWtx : + pwallet->mapWallet) { const CWalletTx &wtx = pairWtx.second; CValidationState state; if (wtx.IsCoinBase() || !ContextualCheckTransactionForCurrentBlock( @@ -1523,7 +1525,8 @@ // Tally std::map mapTally; - for (const std::pair &pairWtx : pwallet->mapWallet) { + for (const std::pair &pairWtx : + pwallet->mapWallet) { const CWalletTx &wtx = pairWtx.second; CValidationState state; @@ -2117,7 +2120,7 @@ } std::map mapAccountBalances; - for (const std::pair &entry : + for (const std::pair &entry : pwallet->mapAddressBook) { // This address belongs to me if (IsMine(*pwallet, entry.first) & includeWatchonly) { @@ -2125,7 +2128,8 @@ } } - for (const std::pair &pairWtx : pwallet->mapWallet) { + for (const std::pair &pairWtx : + pwallet->mapWallet) { const CWalletTx &wtx = pairWtx.second; Amount nFee; std::string strSentAccount; @@ -2159,7 +2163,7 @@ } UniValue ret(UniValue::VOBJ); - for (const std::pair &accountBalance : + for (const std::pair &accountBalance : mapAccountBalances) { ret.pushKV(accountBalance.first, ValueFromAmount(accountBalance.second)); @@ -2329,7 +2333,8 @@ UniValue transactions(UniValue::VARR); - for (const std::pair &pairWtx : pwallet->mapWallet) { + for (const std::pair &pairWtx : + pwallet->mapWallet) { CWalletTx tx = pairWtx.second; if (depth == -1 || tx.GetDepthInMainChain() < depth) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3516,7 +3516,7 @@ LOCK(cs_wallet); // Delete destdata tuples associated with address. - for (const std::pair &item : + for (const std::pair &item : mapAddressBook[address].destdata) { WalletBatch(*database).EraseDestData(address, item.first); } @@ -3933,7 +3933,7 @@ CWallet::GetLabelAddresses(const std::string &label) const { LOCK(cs_wallet); std::set result; - for (const std::pair &item : + for (const std::pair &item : mapAddressBook) { const CTxDestination &address = item.first; const std::string &strName = item.second.name;