X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Frpcwallet.cpp;h=aa91f7f68727557d8039e38a503c10845cd9f5d3;hp=09bacfc789cba725d48530396d9a77b939ecfbbd;hb=34694c603fa90378d59d70804a5862df3845b2b8;hpb=9e58e0a8ca28b15a4bfa677f5b23891972db40fd diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 09bacfc..aa91f7f 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -350,7 +350,7 @@ Value sendtoaddress(const Array& params, bool fHelp) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); string strError = pwalletMain->SendMoney(scriptPubKey, nAmount, wtx); - if (strError != "") + if (!strError.empty()) throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); @@ -738,7 +738,7 @@ Value sendfrom(const Array& params, bool fHelp) // Send string strError = pwalletMain->SendMoney(scriptPubKey, nAmount, wtx); - if (strError != "") + if (!strError.empty()) throw JSONRPCError(RPC_WALLET_ERROR, strError); return wtx.GetHash().GetHex(); @@ -1069,7 +1069,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe bool involvesWatchonly = wtx.IsFromMe(MINE_WATCH_ONLY); // Generated blocks assigned to account "" - if ((nGeneratedMature+nGeneratedImmature) != 0 && (fAllAccounts || strAccount == "")) + if ((nGeneratedMature+nGeneratedImmature) != 0 && (fAllAccounts || strAccount.empty())) { Object entry; entry.push_back(Pair("account", string("")));