From b5f976208d9c87a50d12b6443dcbc9f702eb24d0 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 13 May 2025 13:29:17 -0400 Subject: [PATCH] Save one iteration in parse_number --- src/test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test.cpp b/src/test.cpp index aeb2f3d..5e9ad40 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -461,6 +461,8 @@ private: return false; } callbacks->on_begin_number(data); + ++buf; + --len; for (;;) { if ('0' <= *buf && *buf <= '9') { ++buf; @@ -839,6 +841,7 @@ private: }; const std::string json = R"({ + "a number": 12345, "glossary": { "title": "example glossary", "GlossDiv": {