1
0
mirror of https://github.com/nlohmann/json synced 2024-11-30 23:50:08 +00:00

💄 cleanup

This commit is contained in:
Niels Lohmann 2017-02-16 08:01:01 +01:00
parent 973402c11e
commit 2c17c1b1b2
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 18 deletions

View File

@ -11446,16 +11446,8 @@ basic_json_parser_74:
case lexer::token_type::value_integer:
case lexer::token_type::value_float:
{
const bool ok = m_lexer.get_number(result, last_token);
m_lexer.get_number(result, last_token);
get_token();
// if number conversion was unsuccessful, then is is
// because the number was directly followed by an
// unexpected character (e.g. "01" where "1" is unexpected)
if (not ok)
{
unexpect(last_token);
}
break;
}

View File

@ -10480,16 +10480,8 @@ class basic_json
case lexer::token_type::value_integer:
case lexer::token_type::value_float:
{
const bool ok = m_lexer.get_number(result, last_token);
m_lexer.get_number(result, last_token);
get_token();
// if number conversion was unsuccessful, then is is
// because the number was directly followed by an
// unexpected character (e.g. "01" where "1" is unexpected)
if (not ok)
{
unexpect(last_token);
}
break;
}