Reduce build warnings and enable Qt build
This commit is contained in:
@@ -29,8 +29,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
void EnsureWalletIsUnlocked(bool fAllowAnonOnly);
|
||||
|
||||
std::string static EncodeDumpTime(int64_t nTime)
|
||||
{
|
||||
return DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", nTime);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2673,7 +2673,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
|
||||
if (fFileBacked) {
|
||||
// Delete destdata tuples associated with address
|
||||
std::string strAddress = CBitcoinAddress(address).ToString();
|
||||
for (const PAIRTYPE(string, string) & item : mapAddressBook[address].destdata) {
|
||||
for (const auto& item : mapAddressBook[address].destdata) {
|
||||
CWalletDB(strWalletFile).EraseDestData(strAddress, item.first);
|
||||
}
|
||||
}
|
||||
@@ -2959,7 +2959,7 @@ set<CTxDestination> CWallet::GetAccountAddresses(string strAccount) const
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
set<CTxDestination> result;
|
||||
for (const PAIRTYPE(CTxDestination, CAddressBookData) & item : mapAddressBook) {
|
||||
for (const auto& item : mapAddressBook) {
|
||||
const CTxDestination& address = item.first;
|
||||
const string& strName = item.second.name;
|
||||
if (strName == strAccount)
|
||||
@@ -5075,4 +5075,3 @@ void CWallet::PrecomputeSpends()
|
||||
MilliSleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user