mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
13c9c674fd
commit
2e865f4d4e
@@ -2617,7 +2617,7 @@ class CppGenerator : public BaseGenerator {
|
||||
|
||||
// Generate a default constructor.
|
||||
code_ += " {{STRUCT_NAME}}() {";
|
||||
code_ += " memset(this, 0, sizeof({{STRUCT_NAME}}));";
|
||||
code_ += " memset(static_cast<void *>(this), 0, sizeof({{STRUCT_NAME}}));";
|
||||
code_ += " }";
|
||||
|
||||
// Generate a constructor that takes all fields as arguments.
|
||||
|
||||
Reference in New Issue
Block a user