mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Simplify "bool x = y ? true : false" to "bool x = y"
This commit is contained in:
@@ -212,8 +212,8 @@ UniValue validateaddress(const JSONRPCRequest& request)
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
isminetype mine = pwallet ? IsMine(*pwallet, dest) : ISMINE_NO;
|
||||
ret.push_back(Pair("ismine", (mine & ISMINE_SPENDABLE) ? true : false));
|
||||
ret.push_back(Pair("iswatchonly", (mine & ISMINE_WATCH_ONLY) ? true: false));
|
||||
ret.push_back(Pair("ismine", bool(mine & ISMINE_SPENDABLE)));
|
||||
ret.push_back(Pair("iswatchonly", bool(mine & ISMINE_WATCH_ONLY)));
|
||||
UniValue detail = boost::apply_visitor(DescribeAddressVisitor(pwallet), dest);
|
||||
ret.pushKVs(detail);
|
||||
if (pwallet && pwallet->mapAddressBook.count(dest)) {
|
||||
|
||||
Reference in New Issue
Block a user