From f4d1bae870ac04bb1b1392c6b7d173aa7e079d5e Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 2 Jul 2025 15:00:40 -0400 Subject: Fix C++ deprecation warnings in nlohmann and rapidjson --- rapidjson/document.h | 4 ++-- vendor/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rapidjson/document.h b/rapidjson/document.h index 340b6c40..c9bbea71 100644 --- a/rapidjson/document.h +++ b/rapidjson/document.h @@ -1986,7 +1986,7 @@ private: if (count) { GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); SetElementsPointer(e); - std::memcpy(e, values, count * sizeof(GenericValue)); + std::memcpy(static_cast(e), values, count * sizeof(GenericValue)); } else SetElementsPointer(0); @@ -1999,7 +1999,7 @@ private: if (count) { Member* m = static_cast(allocator.Malloc(count * sizeof(Member))); SetMembersPointer(m); - std::memcpy(m, members, count * sizeof(Member)); + std::memcpy(static_cast(m), members, count * sizeof(Member)); } else SetMembersPointer(0); diff --git a/vendor/nlohmann/json.hpp b/vendor/nlohmann/json.hpp index 658a707f..21cd75f6 100644 --- a/vendor/nlohmann/json.hpp +++ b/vendor/nlohmann/json.hpp @@ -25252,7 +25252,7 @@ if no parse error occurred. @since version 1.0.0 */ JSON_HEDLEY_NON_NULL(1) -inline nlohmann::json operator "" _json(const char* s, std::size_t n) +inline nlohmann::json operator ""_json(const char* s, std::size_t n) { return nlohmann::json::parse(s, s + n); } @@ -25271,7 +25271,7 @@ object if no parse error occurred. @since version 2.0.0 */ JSON_HEDLEY_NON_NULL(1) -inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n) { return nlohmann::json::json_pointer(std::string(s, n)); } -- cgit v1.3.1