From 2c17c1b1b2f7a33abf520b2cf8c53fdf0d6c77c2 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Thu, 16 Feb 2017 08:01:01 +0100 Subject: [PATCH] :lipstick: cleanup --- src/json.hpp | 10 +--------- src/json.hpp.re2c | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index fdb58bfb4..f823d435a 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -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; } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index dbed606c4..d58e80fc8 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -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; }