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

Ignore GCC 8 warnings.

parent 49562271
...@@ -2014,7 +2014,12 @@ private: ...@@ -2014,7 +2014,12 @@ private:
if (count) { if (count) {
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue))); GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
SetElementsPointer(e); 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)); std::memcpy(e, values, count * sizeof(GenericValue));
RAPIDJSON_DIAG_POP
} }
else else
SetElementsPointer(0); SetElementsPointer(0);
...@@ -2027,7 +2032,12 @@ private: ...@@ -2027,7 +2032,12 @@ private:
if (count) { if (count) {
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member))); Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
SetMembersPointer(m); 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)); std::memcpy(m, members, count * sizeof(Member));
RAPIDJSON_DIAG_POP
} }
else else
SetMembersPointer(0); 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