From f94f54a529d0a8be987cdb3aaa3fd21529504cff Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 21 Aug 2026 04:51:10 +0200 Subject: [PATCH] Reformat the parser_callback example with astyle #5386 reformatted this example on develop and extended the CI format check to cover docs/mkdocs/docs/examples, which this branch predates. astyle rewrites "json & /*parsed*/" to "json& /*parsed*/" per --align-reference=type; the result is byte-identical to develop's copy. Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/examples/parser_callback_t.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/mkdocs/docs/examples/parser_callback_t.cpp b/docs/mkdocs/docs/examples/parser_callback_t.cpp index 45794cca6..99c4298e8 100644 --- a/docs/mkdocs/docs/examples/parser_callback_t.cpp +++ b/docs/mkdocs/docs/examples/parser_callback_t.cpp @@ -9,13 +9,13 @@ int main() auto text = R"({"IDs": [116, 943], "Width": 800})"; // discard the array when the parser reads its opening bracket - json j_array_start = json::parse(text, [](int /*depth*/, json::parse_event_t event, json & /*parsed*/) + json j_array_start = json::parse(text, [](int /*depth*/, json::parse_event_t event, json& /*parsed*/) { return event != json::parse_event_t::array_start; }); // discard the same array when the parser reads its closing bracket - json j_array_end = json::parse(text, [](int /*depth*/, json::parse_event_t event, json & /*parsed*/) + json j_array_end = json::parse(text, [](int /*depth*/, json::parse_event_t event, json& /*parsed*/) { return event != json::parse_event_t::array_end; }); @@ -33,7 +33,7 @@ int main() }); // discard the top-level object - json j_root = json::parse(text, [](int /*depth*/, json::parse_event_t event, json & /*parsed*/) + json j_root = json::parse(text, [](int /*depth*/, json::parse_event_t event, json& /*parsed*/) { return event != json::parse_event_t::object_end; });