From c32d2e5b3c735c16eda5673c6cce5bf56effbf20 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 1 Apr 2017 00:36:05 +0200 Subject: [PATCH] :hammer: removed unget() function --- src/json.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index ae3dab6f7..4198b1409 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -11664,7 +11664,8 @@ scan_number_any2: scan_number_done: // unget the character after the number - unget(); + --chars_read; + next_unget = true; // terminate token add('\0'); @@ -11768,13 +11769,6 @@ scan_number_done: : (current = ia->get_character()); } - /// unget a character to the input - void unget() noexcept - { - --chars_read; - next_unget = true; - } - /// add a character to yytext void add(int c) {