Handle empty Json values:

* Replace Json::Value::isNull() and Json::Value::empty with operator bool()
This commit is contained in:
Tom Ritchford
2015-06-18 15:37:29 -04:00
committed by Nik Bougalis
parent a5a9242f4e
commit 9111ad1a9d
22 changed files with 67 additions and 77 deletions

View File

@@ -532,7 +532,7 @@ static boost::optional<detail::STVar> parseLeaf (
AccountID uAccount, uIssuer;
Currency uCurrency;
if (! account.isNull ())
if (account)
{
// human account id
if (! account.isString ())
@@ -556,7 +556,7 @@ static boost::optional<detail::STVar> parseLeaf (
}
}
if (!currency.isNull ())
if (currency)
{
// human currency
if (!currency.isString ())
@@ -577,7 +577,7 @@ static boost::optional<detail::STVar> parseLeaf (
}
}
if (!issuer.isNull ())
if (issuer)
{
// human account id
if (!issuer.isString ())