aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-04-15 13:27:00 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-15 13:40:14 +0200
commitda7bbd9dfdb8914977fc254b0c9b1bb3025726c8 (patch)
tree3d7bc058a06e178b92431212d1948df4c6dda0c8 /src/bitcoinrpc.cpp
parent6642ffb761cc04c990510d8a5e89714e003abb77 (diff)
fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 7c991144d3..63c51ada8d 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -796,8 +796,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;
@@ -1228,6 +1230,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;
@@ -1245,6 +1248,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)