Commit 54dab1ee authored by Romain Geissler's avatar Romain Geissler

Ignore GCC 8 warnings.

parent 49562271
......@@ -2014,7 +2014,12 @@ private:
if (count) {
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e);
RAPIDJSON_DIAG_PUSH
#if defined(__GNUC__) && __GNUC__ >= 8
RAPIDJSON_DIAG_OFF(class-memaccess) // ignore complains from gcc that no trivial copy constructor exists.
#endif
std::memcpy(e, values, count * sizeof(GenericValue));
RAPIDJSON_DIAG_POP
}
else
SetElementsPointer(0);
......@@ -2027,7 +2032,12 @@ private:
if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m);
RAPIDJSON_DIAG_PUSH
#if defined(__GNUC__) && __GNUC__ >= 8
RAPIDJSON_DIAG_OFF(class-memaccess) // ignore complains from gcc that no trivial copy constructor exists.
#endif
std::memcpy(m, members, count * sizeof(Member));
RAPIDJSON_DIAG_POP
}
else
SetMembersPointer(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment