Reduce build warnings and enable Qt build

This commit is contained in:
root
2026-04-28 16:50:31 +00:00
parent 34864c5254
commit 43b88c7110
43 changed files with 164 additions and 87 deletions
+5 -5
View File
@@ -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;