diff --git a/single_include/nlohmann/json_view.hpp b/single_include/nlohmann/json_view.hpp index 999af2bbc..9270a4ebb 100644 --- a/single_include/nlohmann/json_view.hpp +++ b/single_include/nlohmann/json_view.hpp @@ -2627,7 +2627,7 @@ NLOHMANN_JSON_NAMESPACE_END #include // isinf, isnan #include // size_t #include // int64_t, uint8_t, uint32_t, uint64_t -#include // memcmp, memmove +#include // memmove #include // numeric_limits #include // string, to_string #include // decay, enable_if, integral_constant, is_arithmetic, is_convertible, is_floating_point, is_same, is_signed @@ -3738,7 +3738,7 @@ class editor bool key_equals(const node& k, string_view_t key) const noexcept { - return k.len == key.size() && (key.size() == 0 || std::memcmp(m_doc.str(k), key.data(), key.size()) == 0); + return m_doc.key_equals(k, key.data(), key.size()); } /// remove the members with this key (all, or all but the first) from an object