mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 20:23:35 +01:00
Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPE
1238f13cfscripted-diff: Remove PAIRTYPE (Jorge Timón)18dc3c396scripted-diff: Remove Q_FOREACH (Jorge Timón)7c00c2672scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón)a5410ac5eSmall preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
This commit is contained in:
@@ -184,7 +184,7 @@ CAmount CWalletDB::GetAccountCreditDebit(const std::string& strAccount)
|
||||
ListAccountCreditDebit(strAccount, entries);
|
||||
|
||||
CAmount nCreditDebit = 0;
|
||||
BOOST_FOREACH (const CAccountingEntry& entry, entries)
|
||||
for (const CAccountingEntry& entry : entries)
|
||||
nCreditDebit += entry.nCreditDebit;
|
||||
|
||||
return nCreditDebit;
|
||||
@@ -612,7 +612,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
if ((wss.nKeys + wss.nCKeys + wss.nWatchKeys) != wss.nKeyMeta)
|
||||
pwallet->UpdateTimeFirstKey(1);
|
||||
|
||||
BOOST_FOREACH(uint256 hash, wss.vWalletUpgrade)
|
||||
for (uint256 hash : wss.vWalletUpgrade)
|
||||
WriteTx(pwallet->mapWallet[hash]);
|
||||
|
||||
// Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc:
|
||||
@@ -627,7 +627,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
|
||||
pwallet->laccentries.clear();
|
||||
ListAccountCreditDebit("*", pwallet->laccentries);
|
||||
BOOST_FOREACH(CAccountingEntry& entry, pwallet->laccentries) {
|
||||
for (CAccountingEntry& entry : pwallet->laccentries) {
|
||||
pwallet->wtxOrdered.insert(make_pair(entry.nOrderPos, CWallet::TxPair((CWalletTx*)0, &entry)));
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ DBErrors CWalletDB::ZapSelectTx(std::vector<uint256>& vTxHashIn, std::vector<uin
|
||||
// erase each matching wallet TX
|
||||
bool delerror = false;
|
||||
std::vector<uint256>::iterator it = vTxHashIn.begin();
|
||||
BOOST_FOREACH (uint256 hash, vTxHash) {
|
||||
for (uint256 hash : vTxHash) {
|
||||
while (it < vTxHashIn.end() && (*it) < hash) {
|
||||
it++;
|
||||
}
|
||||
@@ -744,7 +744,7 @@ DBErrors CWalletDB::ZapWalletTx(std::vector<CWalletTx>& vWtx)
|
||||
return err;
|
||||
|
||||
// erase each wallet TX
|
||||
BOOST_FOREACH (uint256& hash, vTxHash) {
|
||||
for (uint256& hash : vTxHash) {
|
||||
if (!EraseTx(hash))
|
||||
return DB_CORRUPT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user