rapidjson: patch for building with gcc81

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-05-30 09:57:39 +02:00
parent c3f86ac25a
commit be26df3b80
No known key found for this signature in database
GPG Key ID: 6764EC32352D0647
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- include/rapidjson/document.h 2016-08-25 09:59:05.000000000 +0200
+++ include/rapidjson/document.h 2018-05-30 09:55:35.028135241 +0200
@@ -1936,7 +1936,7 @@
if (count) {
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e);
- std::memcpy(e, values, count * sizeof(GenericValue));
+ *e = *values;
}
else
SetElementsPointer(0);
@@ -1949,7 +1949,7 @@
if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
- std::memcpy(m, members, count * sizeof(Member));
+ *m = *members;
}
else
SetMembersPointer(0);