mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
This commit is contained in:
committed by
Luke Dashjr
parent
678a319888
commit
8460185dec
@@ -685,8 +685,10 @@ Value getbalance(const Array& params, bool fHelp)
|
||||
list<pair<CBitcoinAddress, int64> > listSent;
|
||||
wtx.GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount);
|
||||
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
||||
{
|
||||
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listReceived)
|
||||
nBalance += r.second;
|
||||
}
|
||||
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listSent)
|
||||
nBalance -= r.second;
|
||||
nBalance -= allFee;
|
||||
@@ -1046,6 +1048,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
||||
|
||||
// Received
|
||||
if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth)
|
||||
{
|
||||
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, int64)& r, listReceived)
|
||||
{
|
||||
string account;
|
||||
@@ -1063,6 +1066,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
||||
ret.push_back(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret)
|
||||
|
||||
Reference in New Issue
Block a user