[Fix #5112] flatc generates constructors with memset for non-trivial types (#5222)

This commit is contained in:
Laurent Stacul
2019-03-04 20:10:18 +01:00
committed by Wouter van Oortmerssen
parent 13c9c674fd
commit 2e865f4d4e
5 changed files with 8 additions and 8 deletions

View File

@@ -166,7 +166,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3 FLATBUFFERS_FINAL_CLASS {
public:
Vec3() {
memset(this, 0, sizeof(Vec3));
memset(static_cast<void *>(this), 0, sizeof(Vec3));
}
Vec3(float _x, float _y, float _z)
: x_(flatbuffers::EndianScalar(_x)),