From a3f6967ec7da6d4b0e485964e7c6364fda74bfc8 Mon Sep 17 00:00:00 2001 From: Dmitry <45711841+darkdi@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:47:37 +0300 Subject: [PATCH] Move the CBOR doc block to the function it describes 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 397683744a..a9a1c590ce 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 958ac5fc98..546ba9b55b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -11059,15 +11059,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() { @@ -11086,6 +11077,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) {