Simplify "bool x = y ? true : false" to "bool x = y"

This commit is contained in:
practicalswift
2017-06-08 12:06:09 +02:00
parent 9f841a6c3d
commit 67ca816849
3 changed files with 6 additions and 6 deletions

View File

@@ -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)) {