summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-07-02 15:00:40 -0400
committerJosh Ferrell <josh@vector35.com>2025-07-03 14:09:16 -0400
commitf4d1bae870ac04bb1b1392c6b7d173aa7e079d5e (patch)
treed6c13053f1e97f4b79c5b883dd78a0e41893674d
parentaa9f13d44a271d969d0ec69f5ce0ec159560e8c1 (diff)
Fix C++ deprecation warnings in nlohmann and rapidjson
-rw-r--r--rapidjson/document.h4
-rw-r--r--vendor/nlohmann/json.hpp4
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<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e);
- std::memcpy(e, values, count * sizeof(GenericValue));
+ std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue));
}
else
SetElementsPointer(0);
@@ -1999,7 +1999,7 @@ private:
if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
- std::memcpy(m, members, count * sizeof(Member));
+ std::memcpy(static_cast<void*>(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));
}