diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2017-06-02 03:18:57 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-06-05 20:10:50 +0200 |
commit | 7c00c267264ad80c2991b2f6c2ae08c2d9c9732b (patch) | |
tree | ced05e4a7ca759b23c0306092a66aa0e1c65ce36 /src/wallet/walletdb.cpp | |
parent | a5410ac5ece4ef4d52eab07201c5f6c6c4501921 (diff) |
scripted-diff: Fully remove BOOST_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r-- | src/wallet/walletdb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 342c797dd3..bce6dc8d7f 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -208,7 +208,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; @@ -635,7 +635,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: @@ -650,7 +650,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))); } @@ -736,7 +736,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++; } @@ -767,7 +767,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; } |