From 1238f13cf6ccf1177b66df735f360c61ae1dc20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Fri, 2 Jun 2017 03:28:42 +0200 Subject: scripted-diff: Remove PAIRTYPE -BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair std::pair\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT- --- src/wallet/rpcwallet.cpp | 4 ++-- src/wallet/wallet.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index cfc9ee5c1a..f03137216b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -96,7 +96,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) } entry.push_back(Pair("bip125-replaceable", rbfStatus)); - for (const PAIRTYPE(std::string, std::string)& item : wtx.mapValue) + for (const std::pair& item : wtx.mapValue) entry.push_back(Pair(item.first, item.second)); } @@ -1673,7 +1673,7 @@ UniValue listaccounts(const JSONRPCRequest& request) mapAccountBalances[entry.strAccount] += entry.nCreditDebit; UniValue ret(UniValue::VOBJ); - for (const PAIRTYPE(std::string, CAmount)& accountBalance : mapAccountBalances) { + for (const std::pair& accountBalance : mapAccountBalances) { ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); } return ret; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 531a1fabff..e6e14c6c77 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -804,7 +804,7 @@ void CWallet::MarkDirty() { { LOCK(cs_wallet); - for (PAIRTYPE(const uint256, CWalletTx)& item : mapWallet) + for (std::pair& item : mapWallet) item.second.MarkDirty(); } } @@ -1525,7 +1525,7 @@ void CWallet::ReacceptWalletTransactions() std::map mapSorted; // Sort pending wallet transactions based on their initial wallet insertion order - for (PAIRTYPE(const uint256, CWalletTx)& item : mapWallet) + for (std::pair& item : mapWallet) { const uint256& wtxid = item.first; CWalletTx& wtx = item.second; @@ -1539,7 +1539,7 @@ void CWallet::ReacceptWalletTransactions() } // Try to add wallet transactions to memory pool - for (PAIRTYPE(const int64_t, CWalletTx*)& item : mapSorted) + for (std::pair& item : mapSorted) { CWalletTx& wtx = *(item.second); @@ -1796,7 +1796,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime, CCon LOCK(cs_wallet); // Sort them in chronological order std::multimap mapSorted; - for (PAIRTYPE(const uint256, CWalletTx)& item : mapWallet) + for (std::pair& item : mapWallet) { CWalletTx& wtx = item.second; // Don't rebroadcast if newer than nTime: @@ -1804,7 +1804,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime, CCon continue; mapSorted.insert(std::make_pair(wtx.nTimeReceived, &wtx)); } - for (PAIRTYPE(const unsigned int, CWalletTx*)& item : mapSorted) + for (std::pair& item : mapSorted) { CWalletTx& wtx = *item.second; if (wtx.RelayWalletTransaction(connman)) @@ -3010,7 +3010,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address) // Delete destdata tuples associated with address std::string strAddress = CBitcoinAddress(address).ToString(); - for (const PAIRTYPE(std::string, std::string) &item : mapAddressBook[address].destdata) + for (const std::pair &item : mapAddressBook[address].destdata) { CWalletDB(*dbw).EraseDestData(strAddress, item.first); } @@ -3388,7 +3388,7 @@ std::set CWallet::GetAccountAddresses(const std::string& strAcco { LOCK(cs_wallet); std::set result; - for (const PAIRTYPE(CTxDestination, CAddressBookData)& item : mapAddressBook) + for (const std::pair& item : mapAddressBook) { const CTxDestination& address = item.first; const std::string& strName = item.second.name; -- cgit v1.2.3