From 72f3882054c04a64d689eb1899bc71f4cc095fff Mon Sep 17 00:00:00 2001
From: chiteroman <98092901+chiteroman@users.noreply.github.com>
Date: Wed, 29 Nov 2023 10:10:07 +0100
Subject: [PATCH] Fix JSON parsing, less libs size and few code updates!
---
.idea/deploymentTargetDropDown.xml | 10 +
.idea/gradle.xml | 6 +-
.idea/migrations.xml | 10 +
.idea/misc.xml | 1 -
.idea/vcs.xml | 1 +
app/src/main/cpp/Application.mk | 3 +-
app/src/main/cpp/json.hpp | 1657 +++++++++--------
app/src/main/cpp/main.cpp | 101 +-
.../com/google/android/updater-script | 2 +-
module/customize.sh | 2 +-
module/module.prop | 4 +-
module/post-fs-data.sh | 2 +-
module/service.sh | 7 +-
13 files changed, 1012 insertions(+), 794 deletions(-)
create mode 100644 .idea/deploymentTargetDropDown.xml
create mode 100644 .idea/migrations.xml
diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 0000000..0c0c338
--- /dev/null
+++ b/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 6d89050..0897082 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,18 +1,18 @@
+
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
new file mode 100644
index 0000000..f8051a6
--- /dev/null
+++ b/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0ad17cb..8978d23 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..25dfc0f 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,5 +2,6 @@
+
\ No newline at end of file
diff --git a/app/src/main/cpp/Application.mk b/app/src/main/cpp/Application.mk
index da73f7c..ad31ed4 100644
--- a/app/src/main/cpp/Application.mk
+++ b/app/src/main/cpp/Application.mk
@@ -1,4 +1,3 @@
APP_STL := none
APP_CFLAGS := -Oz -fno-exceptions -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden
-APP_CPPFLAGS := -std=c++20
-APP_LDFLAGS := -Oz
\ No newline at end of file
+APP_CPPFLAGS := -std=c++20
\ No newline at end of file
diff --git a/app/src/main/cpp/json.hpp b/app/src/main/cpp/json.hpp
index 4d1a37a..8b72ea6 100644
--- a/app/src/main/cpp/json.hpp
+++ b/app/src/main/cpp/json.hpp
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
/****************************************************************************\
@@ -27,7 +27,6 @@
#endif // JSON_NO_IO
#include // random_access_iterator_tag
#include // unique_ptr
-#include // accumulate
#include // string, stoi, to_string
#include // declval, forward, move, pair, swap
#include // vector
@@ -35,10 +34,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -48,10 +47,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -60,7 +59,7 @@
#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
- #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2
+ #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3
#warning "Already included a different version of the library!"
#endif
#endif
@@ -68,7 +67,7 @@
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
-#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum)
+#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum)
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
@@ -150,10 +149,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -173,16 +172,19 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
#include // nullptr_t
#include // exception
+#if JSON_DIAGNOSTICS
+ #include // accumulate
+#endif
#include // runtime_error
#include // to_string
#include // vector
@@ -190,10 +192,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -206,10 +208,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -218,10 +220,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -231,10 +233,10 @@
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -318,10 +320,10 @@ NLOHMANN_JSON_NAMESPACE_END
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson
// SPDX-License-Identifier: MIT
@@ -2483,6 +2485,14 @@ JSON_HEDLEY_DIAGNOSTIC_POP
#endif
#endif
+#ifndef JSON_HAS_STATIC_RTTI
+ #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0
+ #define JSON_HAS_STATIC_RTTI 1
+ #else
+ #define JSON_HAS_STATIC_RTTI 0
+ #endif
+#endif
+
#ifdef JSON_HAS_CPP_17
#define JSON_INLINE_VARIABLE inline
#else
@@ -2590,12 +2600,13 @@ JSON_HEDLEY_DIAGNOSTIC_POP
class NumberUnsignedType, class NumberFloatType, \
template class AllocatorType, \
template class JSONSerializer, \
- class BinaryType>
+ class BinaryType, \
+ class CustomBaseClass>
#define NLOHMANN_BASIC_JSON_TPL \
basic_json
+ AllocatorType, JSONSerializer, BinaryType, CustomBaseClass>
// Macros to simplify conversion from/to types
@@ -2745,7 +2756,10 @@ JSON_HEDLEY_DIAGNOSTIC_POP
#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \
friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
- friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { Type nlohmann_json_default_obj; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) }
+ friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) }
+
+#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \
+ friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) }
/*!
@brief macro
@@ -2756,10 +2770,12 @@ JSON_HEDLEY_DIAGNOSTIC_POP
inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
+#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \
+ inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) }
+
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \
inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
- inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { Type nlohmann_json_default_obj; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) }
-
+ inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) }
// inspired from https://stackoverflow.com/a/26745591
// allows to call any std function as if (e.g. with begin):
@@ -2923,10 +2939,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -2998,10 +3014,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -3040,10 +3056,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-FileCopyrightText: 2018 The Abseil Authors
// SPDX-License-Identifier: MIT
@@ -3214,10 +3230,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -3226,14 +3242,15 @@ NLOHMANN_JSON_NAMESPACE_END
#include // false_type, is_constructible, is_integral, is_same, true_type
#include // declval
#include // tuple
+#include // char_traits
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -3298,10 +3315,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -3318,10 +3335,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -3342,10 +3359,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
@@ -3389,7 +3406,8 @@ NLOHMANN_JSON_NAMESPACE_END
template class AllocatorType = std::allocator,
template class JSONSerializer =
adl_serializer,
- class BinaryType = std::vector>
+ class BinaryType = std::vector, // cppcheck-suppress syntaxError
+ class CustomBaseClass = void>
class basic_json;
/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
@@ -3577,6 +3595,63 @@ struct actual_object_comparator
template
using actual_object_comparator_t = typename actual_object_comparator::type;
+/////////////////
+// char_traits //
+/////////////////
+
+// Primary template of char_traits calls std char_traits
+template
+struct char_traits : std::char_traits
+{};
+
+// Explicitly define char traits for unsigned char since it is not standard
+template<>
+struct char_traits : std::char_traits
+{
+ using char_type = unsigned char;
+ using int_type = uint64_t;
+
+ // Redefine to_int_type function
+ static int_type to_int_type(char_type c) noexcept
+ {
+ return static_cast(c);
+ }
+
+ static char_type to_char_type(int_type i) noexcept
+ {
+ return static_cast(i);
+ }
+
+ static constexpr int_type eof() noexcept
+ {
+ return static_cast(EOF);
+ }
+};
+
+// Explicitly define char traits for signed char since it is not standard
+template<>
+struct char_traits : std::char_traits
+{
+ using char_type = signed char;
+ using int_type = uint64_t;
+
+ // Redefine to_int_type function
+ static int_type to_int_type(char_type c) noexcept
+ {
+ return static_cast(c);
+ }
+
+ static char_type to_char_type(int_type i) noexcept
+ {
+ return static_cast(i);
+ }
+
+ static constexpr int_type eof() noexcept
+ {
+ return static_cast(EOF);
+ }
+};
+
///////////////////
// is_ functions //
///////////////////
@@ -3613,7 +3688,6 @@ template
struct is_default_constructible>
: conjunction...> {};
-
template
struct is_constructible : std::is_constructible {};
@@ -3629,7 +3703,6 @@ struct is_constructible> : is_default_constructible
struct is_constructible> : is_default_constructible> {};
-
template
struct is_iterator_traits : std::false_type {};
@@ -4039,7 +4112,6 @@ struct value_in_range_of_impl2
}
};
-
template
struct value_in_range_of_impl2
{
@@ -4138,10 +4210,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -4165,28 +4237,28 @@ inline std::size_t concat_length()
}
template
-inline std::size_t concat_length(const char* cstr, Args&& ... rest);
+inline std::size_t concat_length(const char* cstr, const Args& ... rest);
template
-inline std::size_t concat_length(const StringType& str, Args&& ... rest);
+inline std::size_t concat_length(const StringType& str, const Args& ... rest);
template
-inline std::size_t concat_length(const char /*c*/, Args&& ... rest)
+inline std::size_t concat_length(const char /*c*/, const Args& ... rest)
{
- return 1 + concat_length(std::forward(rest)...);
+ return 1 + concat_length(rest...);
}
template
-inline std::size_t concat_length(const char* cstr, Args&& ... rest)
+inline std::size_t concat_length(const char* cstr, const Args& ... rest)
{
// cppcheck-suppress ignoredReturnValue
- return ::strlen(cstr) + concat_length(std::forward(rest)...);
+ return ::strlen(cstr) + concat_length(rest...);
}
template
-inline std::size_t concat_length(const StringType& str, Args&& ... rest)
+inline std::size_t concat_length(const StringType& str, const Args& ... rest)
{
- return str.size() + concat_length(std::forward(rest)...);
+ return str.size() + concat_length(rest...);
}
template
@@ -4277,7 +4349,7 @@ template
inline OutStringType concat(Args && ... args)
{
OutStringType str;
- str.reserve(concat_length(std::forward(args)...));
+ str.reserve(concat_length(args...));
concat_into(str, std::forward(args)...);
return str;
}
@@ -4286,7 +4358,6 @@ inline OutStringType concat(Args && ... args)
NLOHMANN_JSON_NAMESPACE_END
-
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
{
@@ -4334,9 +4405,9 @@ class exception : public std::exception
{
case value_t::array:
{
- for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i)
+ for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
- if (¤t->m_parent->m_value.array->operator[](i) == current)
+ if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
@@ -4347,7 +4418,7 @@ class exception : public std::exception
case value_t::object:
{
- for (const auto& element : *current->m_parent->m_value.object)
+ for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
@@ -4410,17 +4481,17 @@ class parse_error : public exception
template::value, int> = 0>
static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("parse_error", id_), "parse error",
- position_string(pos), ": ", exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("parse_error", id_), "parse error",
+ position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
}
template::value, int> = 0>
static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("parse_error", id_), "parse error",
- (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""),
- ": ", exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("parse_error", id_), "parse error",
+ (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""),
+ ": ", exception::diagnostics(context), what_arg);
return {id_, byte_, w.c_str()};
}
@@ -4454,7 +4525,7 @@ class invalid_iterator : public exception
template::value, int> = 0>
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
@@ -4472,7 +4543,7 @@ class type_error : public exception
template::value, int> = 0>
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
@@ -4489,7 +4560,7 @@ class out_of_range : public exception
template::value, int> = 0>
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
@@ -4506,7 +4577,7 @@ class other_error : public exception
template::value, int> = 0>
static other_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
- std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg);
+ const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
@@ -4525,10 +4596,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -4549,10 +4620,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -5055,10 +5126,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -5075,10 +5146,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -5147,10 +5218,10 @@ template class iteration_proxy_value
// older GCCs are a bit fussy and require explicit noexcept specifiers on defaulted functions
iteration_proxy_value(iteration_proxy_value&&)
noexcept(std::is_nothrow_move_constructible::value
- && std::is_nothrow_move_constructible::value) = default;
+ && std::is_nothrow_move_constructible::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations)
iteration_proxy_value& operator=(iteration_proxy_value&&)
noexcept(std::is_nothrow_move_assignable::value
- && std::is_nothrow_move_assignable::value) = default;
+ && std::is_nothrow_move_assignable::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations)
~iteration_proxy_value() = default;
/// dereference operator (needed for range-based for)
@@ -5297,11 +5368,11 @@ namespace std
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
template
-class tuple_size<::nlohmann::detail::iteration_proxy_value>
+class tuple_size<::nlohmann::detail::iteration_proxy_value> // NOLINT(cert-dcl58-cpp)
: public std::integral_constant {};
template
-class tuple_element>
+class tuple_element> // NOLINT(cert-dcl58-cpp)
{
public:
using type = decltype(
@@ -5340,7 +5411,7 @@ namespace detail
/*
* Note all external_constructor<>::construct functions need to call
- * j.m_value.destroy(j.m_type) to avoid a memory leak in case j contains an
+ * j.m_data.m_value.destroy(j.m_data.m_type) to avoid a memory leak in case j contains an
* allocated value (e.g., a string). See bug issue
* https://github.com/nlohmann/json/issues/2865 for more information.
*/
@@ -5353,9 +5424,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::boolean;
- j.m_value = b;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::boolean;
+ j.m_data.m_value = b;
j.assert_invariant();
}
};
@@ -5366,18 +5437,18 @@ struct external_constructor
template
static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::string;
- j.m_value = s;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::string;
+ j.m_data.m_value = s;
j.assert_invariant();
}
template
static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::string;
- j.m_value = std::move(s);
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::string;
+ j.m_data.m_value = std::move(s);
j.assert_invariant();
}
@@ -5386,9 +5457,9 @@ struct external_constructor
int > = 0 >
static void construct(BasicJsonType& j, const CompatibleStringType& str)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::string;
- j.m_value.string = j.template create(str);
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::string;
+ j.m_data.m_value.string = j.template create(str);
j.assert_invariant();
}
};
@@ -5399,18 +5470,18 @@ struct external_constructor
template
static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::binary;
- j.m_value = typename BasicJsonType::binary_t(b);
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::binary;
+ j.m_data.m_value = typename BasicJsonType::binary_t(b);
j.assert_invariant();
}
template
static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::binary;
- j.m_value = typename BasicJsonType::binary_t(std::move(b));
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::binary;
+ j.m_data.m_value = typename BasicJsonType::binary_t(std::move(b));
j.assert_invariant();
}
};
@@ -5421,9 +5492,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::number_float;
- j.m_value = val;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::number_float;
+ j.m_data.m_value = val;
j.assert_invariant();
}
};
@@ -5434,9 +5505,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::number_unsigned;
- j.m_value = val;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::number_unsigned;
+ j.m_data.m_value = val;
j.assert_invariant();
}
};
@@ -5447,9 +5518,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::number_integer;
- j.m_value = val;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::number_integer;
+ j.m_data.m_value = val;
j.assert_invariant();
}
};
@@ -5460,9 +5531,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::array;
- j.m_value = arr;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::array;
+ j.m_data.m_value = arr;
j.set_parents();
j.assert_invariant();
}
@@ -5470,9 +5541,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::array;
- j.m_value = std::move(arr);
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::array;
+ j.m_data.m_value = std::move(arr);
j.set_parents();
j.assert_invariant();
}
@@ -5485,9 +5556,9 @@ struct external_constructor
using std::begin;
using std::end;
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::array;
- j.m_value.array = j.template create(begin(arr), end(arr));
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::array;
+ j.m_data.m_value.array = j.template create(begin(arr), end(arr));
j.set_parents();
j.assert_invariant();
}
@@ -5495,14 +5566,14 @@ struct external_constructor
template
static void construct(BasicJsonType& j, const std::vector& arr)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::array;
- j.m_value = value_t::array;
- j.m_value.array->reserve(arr.size());
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::array;
+ j.m_data.m_value = value_t::array;
+ j.m_data.m_value.array->reserve(arr.size());
for (const bool x : arr)
{
- j.m_value.array->push_back(x);
- j.set_parent(j.m_value.array->back());
+ j.m_data.m_value.array->push_back(x);
+ j.set_parent(j.m_data.m_value.array->back());
}
j.assert_invariant();
}
@@ -5511,13 +5582,13 @@ struct external_constructor
enable_if_t::value, int> = 0>
static void construct(BasicJsonType& j, const std::valarray& arr)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::array;
- j.m_value = value_t::array;
- j.m_value.array->resize(arr.size());
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::array;
+ j.m_data.m_value = value_t::array;
+ j.m_data.m_value.array->resize(arr.size());
if (arr.size() > 0)
{
- std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin());
+ std::copy(std::begin(arr), std::end(arr), j.m_data.m_value.array->begin());
}
j.set_parents();
j.assert_invariant();
@@ -5530,9 +5601,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::object;
- j.m_value = obj;
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::object;
+ j.m_data.m_value = obj;
j.set_parents();
j.assert_invariant();
}
@@ -5540,9 +5611,9 @@ struct external_constructor
template
static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj)
{
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::object;
- j.m_value = std::move(obj);
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::object;
+ j.m_data.m_value = std::move(obj);
j.set_parents();
j.assert_invariant();
}
@@ -5554,9 +5625,9 @@ struct external_constructor
using std::begin;
using std::end;
- j.m_value.destroy(j.m_type);
- j.m_type = value_t::object;
- j.m_value.object = j.template create(begin(obj), end(obj));
+ j.m_data.m_value.destroy(j.m_data.m_type);
+ j.m_data.m_type = value_t::object;
+ j.m_data.m_value.object = j.template create(begin(obj), end(obj));
j.set_parents();
j.assert_invariant();
}
@@ -5796,10 +5867,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -5908,10 +5979,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -6041,10 +6112,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -6067,10 +6138,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -6094,6 +6165,8 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
+// #include
+
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
@@ -6140,7 +6213,6 @@ class file_input_adapter
std::FILE* m_file;
};
-
/*!
Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at
beginning of input. Does not support changing the underlying std::streambuf
@@ -6214,16 +6286,16 @@ class iterator_input_adapter
: current(std::move(first)), end(std::move(last))
{}
- typename std::char_traits::int_type get_character()
+ typename char_traits::int_type get_character()
{
if (JSON_HEDLEY_LIKELY(current != end))
{
- auto result = std::char_traits::to_int_type(*current);
+ auto result = char_traits::to_int_type(*current);
std::advance(current, 1);
return result;
}
- return std::char_traits::eof();
+ return char_traits::eof();
}
private:
@@ -6239,7 +6311,6 @@ class iterator_input_adapter
}
};
-
template
struct wide_string_input_helper;
@@ -6363,7 +6434,7 @@ struct wide_string_input_helper
}
};
-// Wraps another input apdater to convert wide character types into individual bytes.
+// Wraps another input adapter to convert wide character types into individual bytes.
template
class wide_string_input_adapter
{
@@ -6408,7 +6479,6 @@ class wide_string_input_adapter
std::size_t utf8_bytes_filled = 0;
};
-
template
struct iterator_input_adapter_factory
{
@@ -6565,10 +6635,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -6710,7 +6780,6 @@ struct json_sax
virtual ~json_sax() = default;
};
-
namespace detail
{
/*!
@@ -6812,7 +6881,7 @@ class json_sax_dom_parser
JSON_ASSERT(ref_stack.back()->is_object());
// add null at given key and store the reference for later
- object_element = &(ref_stack.back()->m_value.object->operator[](val));
+ object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val));
return true;
}
@@ -6887,8 +6956,8 @@ class json_sax_dom_parser
if (ref_stack.back()->is_array())
{
- ref_stack.back()->m_value.array->emplace_back(std::forward(v));
- return &(ref_stack.back()->m_value.array->back());
+ ref_stack.back()->m_data.m_value.array->emplace_back(std::forward(v));
+ return &(ref_stack.back()->m_data.m_value.array->back());
}
JSON_ASSERT(ref_stack.back()->is_object());
@@ -7007,7 +7076,7 @@ class json_sax_dom_callback_parser
// add discarded value at given key and store the reference for later
if (keep && ref_stack.back())
{
- object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);
+ object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded);
}
return true;
@@ -7092,7 +7161,7 @@ class json_sax_dom_callback_parser
// remove discarded value
if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
{
- ref_stack.back()->m_value.array->pop_back();
+ ref_stack.back()->m_data.m_value.array->pop_back();
}
return true;
@@ -7159,7 +7228,7 @@ class json_sax_dom_callback_parser
if (ref_stack.empty())
{
root = std::move(value);
- return {true, &root};
+ return {true, & root};
}
// skip this value if we already decided to skip the parent
@@ -7175,8 +7244,8 @@ class json_sax_dom_callback_parser
// array
if (ref_stack.back()->is_array())
{
- ref_stack.back()->m_value.array->emplace_back(std::move(value));
- return {true, &(ref_stack.back()->m_value.array->back())};
+ ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
+ return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
@@ -7298,10 +7367,10 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
-// | | |__ | | | | | | version 3.11.2
+// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
-// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann
+// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann
// SPDX-License-Identifier: MIT
@@ -7322,6 +7391,8 @@ NLOHMANN_JSON_NAMESPACE_END
// #include
+// #include
+
NLOHMANN_JSON_NAMESPACE_BEGIN
namespace detail
@@ -7416,7 +7487,7 @@ class lexer : public lexer_base
using number_float_t = typename BasicJsonType::number_float_t;
using string_t = typename BasicJsonType::string_t;
using char_type = typename InputAdapterType::char_type;
- using char_int_type = typename std::char_traits::int_type;
+ using char_int_type = typename char_traits::int_type;
public:
using token_type = typename lexer_base::token_type;
@@ -7523,7 +7594,7 @@ class lexer : public lexer_base
for (auto range = ranges.begin(); range != ranges.end(); ++range)
{
get();
- if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range)))
+ if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions)
{
add(current);
}
@@ -7566,7 +7637,7 @@ class lexer : public lexer_base
switch (get())
{
// end of file while parsing string
- case std::char_traits::eof():
+ case char_traits::eof():
{
error_message = "invalid string: missing closing quote";
return token_type::parse_error;
@@ -8155,7 +8226,7 @@ class lexer : public lexer_base
{
case '\n':
case '\r':
- case std::char_traits::eof():
+ case char_traits::eof():
case '\0':
return true;
@@ -8172,7 +8243,7 @@ class lexer : public lexer_base
{
switch (get())
{
- case std::char_traits::eof():
+ case char_traits::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
@@ -8601,10 +8672,10 @@ scan_number_done:
token_type scan_literal(const char_type* literal_text, const std::size_t length,
token_type return_type)
{
- JSON_ASSERT(std::char_traits::to_char_type(current) == literal_text[0]);
+ JSON_ASSERT(char_traits::to_char_type(current) == literal_text[0]);
for (std::size_t i = 1; i < length; ++i)
{
- if (JSON_HEDLEY_UNLIKELY(std::char_traits::to_char_type(get()) != literal_text[i]))
+ if (JSON_HEDLEY_UNLIKELY(char_traits::to_char_type(get()) != literal_text[i]))
{
error_message = "invalid literal";
return token_type::parse_error;
@@ -8622,7 +8693,7 @@ scan_number_done:
{
token_buffer.clear();
token_string.clear();
- token_string.push_back(std::char_traits::to_char_type(current));
+ token_string.push_back(char_traits::to_char_type(current));
}
/*
@@ -8630,7 +8701,7 @@ scan_number_done:
This function provides the interface to the used input adapter. It does
not throw in case the input reached EOF, but returns a
- `std::char_traits::eof()` in that case. Stores the scanned characters
+ `char_traits::eof()` in that case. Stores the scanned characters
for use in error messages.
@return character read from the input
@@ -8650,9 +8721,9 @@ scan_number_done:
current = ia.get_character();
}
- if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof()))
+ if (JSON_HEDLEY_LIKELY(current != char_traits::eof()))
{
- token_string.push_back(std::char_traits::to_char_type(current));
+ token_string.push_back(char_traits::to_char_type(current));
}
if (current == '\n')
@@ -8691,7 +8762,7 @@ scan_number_done:
--position.chars_read_current_line;
}
- if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof()))
+ if (JSON_HEDLEY_LIKELY(current != char_traits::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
@@ -8885,7 +8956,7 @@ scan_number_done:
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
- case std::char_traits::eof():
+ case char_traits::eof():
return token_type::end_of_input;
// error
@@ -8903,7 +8974,7 @@ scan_number_done:
const bool ignore_comments = false;
/// the current character
- char_int_type current = std::char_traits