diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2017-06-02 03:28:42 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-06-05 20:14:53 +0200 |
commit | 1238f13cf6ccf1177b66df735f360c61ae1dc20b (patch) | |
tree | fd29fef9e9760c49b121f8191307544ae711d426 /src/wallet | |
parent | 18dc3c396299caccb0df31254aaec0d08b70dd2a (diff) |
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<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 14 |
2 files changed, 9 insertions, 9 deletions
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<std::string, std::string>& 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<std::string, CAmount>& 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<const uint256, CWalletTx>& item : mapWallet) item.second.MarkDirty(); } } @@ -1525,7 +1525,7 @@ void CWallet::ReacceptWalletTransactions() std::map<int64_t, CWalletTx*> mapSorted; // Sort pending wallet transactions based on their initial wallet insertion order - for (PAIRTYPE(const uint256, CWalletTx)& item : mapWallet) + for (std::pair<const uint256, CWalletTx>& 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<const int64_t, CWalletTx*>& item : mapSorted) { CWalletTx& wtx = *(item.second); @@ -1796,7 +1796,7 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime, CCon LOCK(cs_wallet); // Sort them in chronological order std::multimap<unsigned int, CWalletTx*> mapSorted; - for (PAIRTYPE(const uint256, CWalletTx)& item : mapWallet) + for (std::pair<const uint256, CWalletTx>& item : mapWallet) { CWalletTx& wtx = item.second; // Don't rebroadcast if newer than nTime: @@ -1804,7 +1804,7 @@ std::vector<uint256> 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<const unsigned int, CWalletTx*>& 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<std::string, std::string> &item : mapAddressBook[address].destdata) { CWalletDB(*dbw).EraseDestData(strAddress, item.first); } @@ -3388,7 +3388,7 @@ std::set<CTxDestination> CWallet::GetAccountAddresses(const std::string& strAcco { LOCK(cs_wallet); std::set<CTxDestination> result; - for (const PAIRTYPE(CTxDestination, CAddressBookData)& item : mapAddressBook) + for (const std::pair<CTxDestination, CAddressBookData>& item : mapAddressBook) { const CTxDestination& address = item.first; const std::string& strName = item.second.name; |