Reduce build warnings and enable Qt build
This commit is contained in:
@@ -68,7 +68,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry)
|
||||
entry.push_back(Pair("walletconflicts", conflicts));
|
||||
entry.push_back(Pair("time", wtx.GetTxTime()));
|
||||
entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
|
||||
for (const PAIRTYPE(string, string) & item : wtx.mapValue)
|
||||
for (const auto& item : wtx.mapValue)
|
||||
entry.push_back(Pair(item.first, item.second));
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
|
||||
|
||||
// Find all addresses that have the given account
|
||||
UniValue ret(UniValue::VARR);
|
||||
for (const PAIRTYPE(CBitcoinAddress, CAddressBookData) & item : pwalletMain->mapAddressBook) {
|
||||
for (const auto& item : pwalletMain->mapAddressBook) {
|
||||
const CBitcoinAddress& address = item.first;
|
||||
const string& strName = item.second.name;
|
||||
if (strName == strAccount)
|
||||
@@ -1109,7 +1109,7 @@ UniValue ListReceived(const UniValue& params, bool fByAccounts)
|
||||
// Reply
|
||||
UniValue ret(UniValue::VARR);
|
||||
map<string, tallyitem> mapAccountTally;
|
||||
for (const PAIRTYPE(CBitcoinAddress, CAddressBookData) & item : pwalletMain->mapAddressBook) {
|
||||
for (const auto& item : pwalletMain->mapAddressBook) {
|
||||
const CBitcoinAddress& address = item.first;
|
||||
const string& strAccount = item.second.name;
|
||||
map<CBitcoinAddress, tallyitem>::iterator it = mapTally.find(address);
|
||||
@@ -1483,7 +1483,7 @@ UniValue listaccounts(const UniValue& params, bool fHelp)
|
||||
includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY;
|
||||
|
||||
map<string, CAmount> mapAccountBalances;
|
||||
for (const PAIRTYPE(CTxDestination, CAddressBookData) & entry : pwalletMain->mapAddressBook) {
|
||||
for (const auto& entry : pwalletMain->mapAddressBook) {
|
||||
if (IsMine(*pwalletMain, entry.first) & includeWatchonly) // This address belongs to me
|
||||
mapAccountBalances[entry.second.name] = 0;
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ UniValue listaccounts(const UniValue& params, bool fHelp)
|
||||
mapAccountBalances[entry.strAccount] += entry.nCreditDebit;
|
||||
|
||||
UniValue ret(UniValue::VOBJ);
|
||||
for (const PAIRTYPE(string, CAmount) & accountBalance : mapAccountBalances) {
|
||||
for (const auto& accountBalance : mapAccountBalances) {
|
||||
ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second)));
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user