From 1c136a66c4f5b826d82cd5dbb1161c466d943b3e Mon Sep 17 00:00:00 2001 From: Dmitry <45711841+darkdi@users.noreply.github.com> Date: Thu, 6 Aug 2026 09:30:15 +0300 Subject: [PATCH] Move the CBOR doc block to the function it describes (#5363) The block documenting get_char and tag_handler sat above get_cbor_negative_integer(), which takes neither, so Doxygen attached it there and parse_cbor_internal() was left undocumented. Comment placement only. Signed-off-by: Dmitry <45711841+darkdi@users.noreply.github.com> --- include/nlohmann/detail/input/binary_reader.hpp | 17 ++++++++--------- single_include/nlohmann/json.hpp | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index f5d209b88..e3574d778 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -465,15 +465,6 @@ class binary_reader // CBOR // ////////// - /*! - @param[in] get_char whether a new character should be retrieved from the - input (true) or whether the last read character should - be considered instead (false) - @param[in] tag_handler how CBOR tags should be treated - - @return whether a valid CBOR value was passed to the SAX parser - */ - template bool get_cbor_negative_integer() { @@ -492,6 +483,14 @@ class binary_reader return sax->number_integer(static_cast(-1) - static_cast(number)); } + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true) or whether the last read character should + be considered instead (false) + @param[in] tag_handler how CBOR tags should be treated + + @return whether a valid CBOR value was passed to the SAX parser + */ bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index fa6199da1..724865e11 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -11087,15 +11087,6 @@ class binary_reader // CBOR // ////////// - /*! - @param[in] get_char whether a new character should be retrieved from the - input (true) or whether the last read character should - be considered instead (false) - @param[in] tag_handler how CBOR tags should be treated - - @return whether a valid CBOR value was passed to the SAX parser - */ - template bool get_cbor_negative_integer() { @@ -11114,6 +11105,14 @@ class binary_reader return sax->number_integer(static_cast(-1) - static_cast(number)); } + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true) or whether the last read character should + be considered instead (false) + @param[in] tag_handler how CBOR tags should be treated + + @return whether a valid CBOR value was passed to the SAX parser + */ bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler) {