From 818be76082478fa3b71c759c843f81c84e496692 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Thu, 20 Aug 2026 22:06:00 +0200 Subject: [PATCH] Reattach convert_number's documentation @gregmarr spotted that convert_integer() was inserted between convert_number() and its doc block, leaving convert_integer() with two stacked blocks and convert_number() with none. Comment only; no code change. Signed-off-by: Niels Lohmann --- include/nlohmann/detail/input/lexer.hpp | 18 +++++++++--------- single_include/nlohmann/json.hpp | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index d77510ed9..62d517e86 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -1349,15 +1349,6 @@ scan_number_done: return convert_number(number_type); } - /*! - @brief convert the number text in token_buffer to its value and token type - - The digit sequence in token_buffer has already been validated (by the - scan_number() state machine or by the contiguous fast path) and holds the - locale decimal point in place of '.'. Integers are parsed first and fall - back to floating point on overflow. This is shared so both scanners produce - identical results. - */ /*! @brief convert an already-validated integer token to its value @@ -1389,6 +1380,15 @@ scan_number_done: return token_type::uninitialized; } + /*! + @brief convert the number text in token_buffer to its value and token type + + The digit sequence in token_buffer has already been validated (by the + scan_number() state machine or by the contiguous fast path) and holds the + locale decimal point in place of '.'. Integers are parsed first and fall + back to floating point on overflow. This is shared so both scanners produce + identical results. + */ token_type convert_number(token_type number_type) { const char* const num_begin = token_buffer.data(); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index eb509cbf5..ae073e4ba 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -9698,15 +9698,6 @@ scan_number_done: return convert_number(number_type); } - /*! - @brief convert the number text in token_buffer to its value and token type - - The digit sequence in token_buffer has already been validated (by the - scan_number() state machine or by the contiguous fast path) and holds the - locale decimal point in place of '.'. Integers are parsed first and fall - back to floating point on overflow. This is shared so both scanners produce - identical results. - */ /*! @brief convert an already-validated integer token to its value @@ -9738,6 +9729,15 @@ scan_number_done: return token_type::uninitialized; } + /*! + @brief convert the number text in token_buffer to its value and token type + + The digit sequence in token_buffer has already been validated (by the + scan_number() state machine or by the contiguous fast path) and holds the + locale decimal point in place of '.'. Integers are parsed first and fall + back to floating point on overflow. This is shared so both scanners produce + identical results. + */ token_type convert_number(token_type number_type) { const char* const num_begin = token_buffer.data();