From 6fa4f96ba33b8cf52ce1c783dcd0e28cec13c4a7 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 11 Dec 2016 16:03:23 +0100 Subject: [PATCH] :memo: fixed two documentation warnings --- src/json.hpp | 28 ++++++++++------------------ src/json.hpp.re2c | 28 ++++++++++------------------ 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 6fed0a12..48d5ba56 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -944,7 +944,7 @@ class basic_json With a parser callback function, the result of parsing a JSON text can be influenced. When passed to @ref parse(std::istream&, const - parser_callback_t) or @ref parse(const char*, const parser_callback_t), + parser_callback_t) or @ref parse(const CharT, const parser_callback_t), it is called on certain events (passed as @ref parse_event_t via parameter @a event) with a set recursion depth @a depth and context JSON value @a parsed. The return value of the callback function is a boolean @@ -987,7 +987,7 @@ class basic_json skipped completely or replaced by an empty discarded object. @sa @ref parse(std::istream&, parser_callback_t) or - @ref parse(const char*, parser_callback_t) for examples + @ref parse(const CharT, const parser_callback_t) for examples @since version 1.0.0 */ @@ -6003,11 +6003,11 @@ class basic_json @since version 1.0.0 (originally for @ref string_t) */ - template::value and - std::is_integral::type>::value and - sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> - static basic_json parse(const CharPT s, + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> + static basic_json parse(const CharT s, const parser_callback_t cb = nullptr) { return parser(reinterpret_cast(s), cb).parse(); @@ -6032,7 +6032,7 @@ class basic_json @liveexample{The example below demonstrates the `parse()` function with and without callback function.,parse__istream__parser_callback_t} - @sa @ref parse(const char*, const parser_callback_t) for a version + @sa @ref parse(const CharT, const parser_callback_t) for a version that reads from a string @since version 1.0.0 @@ -9068,8 +9068,6 @@ basic_json_parser_66: supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -9088,8 +9086,6 @@ basic_json_parser_66: supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -9108,8 +9104,6 @@ basic_json_parser_66: supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -9997,13 +9991,11 @@ basic_json_parser_66: /*! @brief replace all occurrences of a substring by another string - @param[in,out] s the string to manipulate + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t @param[in] f the substring to replace with @a t @param[in] t the string to replace @a f - @return The string @a s where all occurrences of @a f are replaced - with @a t. - @pre The search string @a f must not be empty. @since version 2.0.0 diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index c6a99b89..a3d01d39 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -944,7 +944,7 @@ class basic_json With a parser callback function, the result of parsing a JSON text can be influenced. When passed to @ref parse(std::istream&, const - parser_callback_t) or @ref parse(const char*, const parser_callback_t), + parser_callback_t) or @ref parse(const CharT, const parser_callback_t), it is called on certain events (passed as @ref parse_event_t via parameter @a event) with a set recursion depth @a depth and context JSON value @a parsed. The return value of the callback function is a boolean @@ -987,7 +987,7 @@ class basic_json skipped completely or replaced by an empty discarded object. @sa @ref parse(std::istream&, parser_callback_t) or - @ref parse(const char*, parser_callback_t) for examples + @ref parse(const CharT, const parser_callback_t) for examples @since version 1.0.0 */ @@ -6003,11 +6003,11 @@ class basic_json @since version 1.0.0 (originally for @ref string_t) */ - template::value and - std::is_integral::type>::value and - sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> - static basic_json parse(const CharPT s, + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> + static basic_json parse(const CharT s, const parser_callback_t cb = nullptr) { return parser(reinterpret_cast(s), cb).parse(); @@ -6032,7 +6032,7 @@ class basic_json @liveexample{The example below demonstrates the `parse()` function with and without callback function.,parse__istream__parser_callback_t} - @sa @ref parse(const char*, const parser_callback_t) for a version + @sa @ref parse(const CharT, const parser_callback_t) for a version that reads from a string @since version 1.0.0 @@ -8217,8 +8217,6 @@ class basic_json supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -8237,8 +8235,6 @@ class basic_json supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -8257,8 +8253,6 @@ class basic_json supplied via the first parameter. Set this to @a static_cast(nullptr). - @param[in] type the @ref number_float_t in use - @param[in,out] endptr recieves a pointer to the first character after the number @@ -9146,13 +9140,11 @@ class basic_json /*! @brief replace all occurrences of a substring by another string - @param[in,out] s the string to manipulate + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t @param[in] f the substring to replace with @a t @param[in] t the string to replace @a f - @return The string @a s where all occurrences of @a f are replaced - with @a t. - @pre The search string @a f must not be empty. @since version 2.0.0