From b93d414a350694ee1107342cdebe087a5be080ae Mon Sep 17 00:00:00 2001 From: Florian Pigorsch Date: Sat, 19 Oct 2019 11:59:46 +0200 Subject: [PATCH] Fix some spelling errors - mostly in comments & documentation. I did not touch the Changelog file and any third party stuff. additonal -> additional (1) apppend -> append (2) constuctor -> constructor (2) contect -> context (2) dobulequote -> doublequote (1) elemnts -> elements (1) exakt -> exact (2) exluded -> exclude (1) explicitely -> explicitly (2) narcissic -> narcissistic (1) ocurred -> occurred (1) occuring -> occurring (2) preceeds -> preceded (1) ot -> to (2) wehther -> whether (2) --- doc/examples/json_pointer__operator_add.cpp | 2 +- doc/examples/json_pointer__operator_add_binary.cpp | 2 +- include/nlohmann/detail/conversions/to_chars.hpp | 2 +- include/nlohmann/detail/input/binary_reader.hpp | 2 +- include/nlohmann/detail/iterators/iter_impl.hpp | 4 ++-- include/nlohmann/detail/json_pointer.hpp | 2 +- include/nlohmann/json.hpp | 2 +- single_include/nlohmann/json.hpp | 12 ++++++------ test/src/unit-cbor.cpp | 2 +- test/src/unit-class_parser.cpp | 2 +- test/src/unit-msgpack.cpp | 2 +- test/src/unit-regression.cpp | 2 +- test/src/unit-udt.cpp | 2 +- test/src/unit-unicode.cpp | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/examples/json_pointer__operator_add.cpp b/doc/examples/json_pointer__operator_add.cpp index 7520feb22..a2bbf59e8 100644 --- a/doc/examples/json_pointer__operator_add.cpp +++ b/doc/examples/json_pointer__operator_add.cpp @@ -9,7 +9,7 @@ int main() json::json_pointer ptr("/foo"); std::cout << ptr << '\n'; - // apppend a JSON Pointer + // append a JSON Pointer ptr /= json::json_pointer("/bar/baz"); std::cout << ptr << '\n'; diff --git a/doc/examples/json_pointer__operator_add_binary.cpp b/doc/examples/json_pointer__operator_add_binary.cpp index 620763e14..89e0a6a53 100644 --- a/doc/examples/json_pointer__operator_add_binary.cpp +++ b/doc/examples/json_pointer__operator_add_binary.cpp @@ -8,7 +8,7 @@ int main() // create a JSON pointer json::json_pointer ptr("/foo"); - // apppend a JSON Pointer + // append a JSON Pointer std::cout << ptr / json::json_pointer("/bar/baz") << '\n'; // append a string diff --git a/include/nlohmann/detail/conversions/to_chars.hpp b/include/nlohmann/detail/conversions/to_chars.hpp index feafaec84..d99703a54 100644 --- a/include/nlohmann/detail/conversions/to_chars.hpp +++ b/include/nlohmann/detail/conversions/to_chars.hpp @@ -330,7 +330,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e) // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // - // If c were an exakt power of ten, i.e. c = 10^k, one may determine k as + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index f33d89cb6..1b6e0f9b7 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -1929,7 +1929,7 @@ class binary_reader /*! @param[in] format the current format @param[in] detail a detailed error message - @param[in] context further contect information + @param[in] context further context information @return a message string to use in the parse_error exceptions */ std::string exception_message(const input_format_t format, diff --git a/include/nlohmann/detail/iterators/iter_impl.hpp b/include/nlohmann/detail/iterators/iter_impl.hpp index 336aba1a4..3a3629719 100644 --- a/include/nlohmann/detail/iterators/iter_impl.hpp +++ b/include/nlohmann/detail/iterators/iter_impl.hpp @@ -121,8 +121,8 @@ class iter_impl /*! @brief const copy constructor @param[in] other const iterator to copy from - @note This copy constuctor had to be defined explicitely to circumvent a bug - occuring on msvc v19.0 compiler (VS 2015) debug build. For more + @note This copy constructor had to be defined explicitly to circumvent a bug + occurring on msvc v19.0 compiler (VS 2015) debug build. For more information refer to: https://github.com/nlohmann/json/issues/1608 */ iter_impl(const iter_impl& other) noexcept diff --git a/include/nlohmann/detail/json_pointer.hpp b/include/nlohmann/detail/json_pointer.hpp index 041408a80..87af34233 100644 --- a/include/nlohmann/detail/json_pointer.hpp +++ b/include/nlohmann/detail/json_pointer.hpp @@ -126,7 +126,7 @@ class json_pointer /*! @brief append an array index at the end of this JSON pointer - @param[in] array_index array index ot append + @param[in] array_index array index to append @return JSON pointer with @a array_index appended @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add} diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 895a8ec1d..d63ffb928 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -4019,7 +4019,7 @@ class basic_json /*! @brief check the existence of an element in a JSON object given a JSON pointer - Check wehther the given JSON pointer @a ptr can be resolved in the current + Check whether the given JSON pointer @a ptr can be resolved in the current JSON value. @note This method can be executed on any JSON value type. diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index e680d8b7d..3094de39f 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -7056,7 +7056,7 @@ class binary_reader /*! @param[in] format the current format @param[in] detail a detailed error message - @param[in] context further contect information + @param[in] context further context information @return a message string to use in the parse_error exceptions */ std::string exception_message(const input_format_t format, @@ -9414,8 +9414,8 @@ class iter_impl /*! @brief const copy constructor @param[in] other const iterator to copy from - @note This copy constuctor had to be defined explicitely to circumvent a bug - occuring on msvc v19.0 compiler (VS 2015) debug build. For more + @note This copy constructor had to be defined explicitly to circumvent a bug + occurring on msvc v19.0 compiler (VS 2015) debug build. For more information refer to: https://github.com/nlohmann/json/issues/1608 */ iter_impl(const iter_impl& other) noexcept @@ -10187,7 +10187,7 @@ class json_pointer /*! @brief append an array index at the end of this JSON pointer - @param[in] array_index array index ot append + @param[in] array_index array index to append @return JSON pointer with @a array_index appended @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add} @@ -12966,7 +12966,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e) // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // - // If c were an exakt power of ten, i.e. c = 10^k, one may determine k as + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) @@ -18549,7 +18549,7 @@ class basic_json /*! @brief check the existence of an element in a JSON object given a JSON pointer - Check wehther the given JSON pointer @a ptr can be resolved in the current + Check whether the given JSON pointer @a ptr can be resolved in the current JSON value. @note This method can be executed on any JSON value type. diff --git a/test/src/unit-cbor.cpp b/test/src/unit-cbor.cpp index 399eed282..73f233869 100644 --- a/test/src/unit-cbor.cpp +++ b/test/src/unit-cbor.cpp @@ -1287,7 +1287,7 @@ TEST_CASE("CBOR") } } - SECTION("additonal deserialization") + SECTION("additional deserialization") { SECTION("0x7b (string)") { diff --git a/test/src/unit-class_parser.cpp b/test/src/unit-class_parser.cpp index 098920fd4..d492d565a 100644 --- a/test/src/unit-class_parser.cpp +++ b/test/src/unit-class_parser.cpp @@ -210,7 +210,7 @@ json parser_helper(const std::string& s) json j; json::parser(nlohmann::detail::input_adapter(s)).parse(true, j); - // if this line was reached, no exception ocurred + // if this line was reached, no exception occurred // -> check if result is the same without exceptions json j_nothrow; CHECK_NOTHROW(json::parser(nlohmann::detail::input_adapter(s), nullptr, false).parse(true, j_nothrow)); diff --git a/test/src/unit-msgpack.cpp b/test/src/unit-msgpack.cpp index 09ff7c510..d37c36788 100644 --- a/test/src/unit-msgpack.cpp +++ b/test/src/unit-msgpack.cpp @@ -1359,7 +1359,7 @@ TEST_CASE("MessagePack roundtrips" * doctest::skip()) { SECTION("input from msgpack-python") { - // most of these are exluded due to differences in key order (not a real problem) + // most of these are excluded due to differences in key order (not a real problem) auto exclude_packed = std::set { "test/data/json.org/1.json", diff --git a/test/src/unit-regression.cpp b/test/src/unit-regression.cpp index e0c5b20ab..0c75dcbc3 100644 --- a/test/src/unit-regression.cpp +++ b/test/src/unit-regression.cpp @@ -164,7 +164,7 @@ TEST_CASE("regression tests") { SECTION("issue #60 - Double quotation mark is not parsed correctly") { - SECTION("escape_dobulequote") + SECTION("escape_doublequote") { auto s = "[\"\\\"foo\\\"\"]"; json j = json::parse(s); diff --git a/test/src/unit-udt.cpp b/test/src/unit-udt.cpp index 41c952e58..188cdca0c 100644 --- a/test/src/unit-udt.cpp +++ b/test/src/unit-udt.cpp @@ -238,7 +238,7 @@ void from_json(const nlohmann::json& j, contact_book& cb) TEST_CASE("basic usage" * doctest::test_suite("udt")) { - // a bit narcissic maybe :) ? + // a bit narcissistic maybe :) ? const udt::age a { 23 diff --git a/test/src/unit-unicode.cpp b/test/src/unit-unicode.cpp index 4663f9c89..cfe8e5b2e 100644 --- a/test/src/unit-unicode.cpp +++ b/test/src/unit-unicode.cpp @@ -1152,7 +1152,7 @@ TEST_CASE("Unicode" * doctest::skip()) json j; CHECK_NOTHROW(f >> j); - // the array has 1112064 + 1 elemnts (a terminating "null" value) + // the array has 1112064 + 1 elements (a terminating "null" value) // Note: 1112064 = 0x1FFFFF code points - 2048 invalid values between // 0xD800 and 0xDFFF. CHECK(j.size() == 1112065);