diff options
Diffstat (limited to 'src/idl_gen_cpp.cpp')
-rw-r--r-- | src/idl_gen_cpp.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index 3fe447ef..169acd58 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -87,8 +87,6 @@ class CppGenerator : public BaseGenerator { // Iterate through all definitions we haven't generate code for (enums, // structs, and tables) and output them to a single file. bool generate() { - if (IsEverythingGenerated()) return true; - code_.Clear(); code_ += "// " + std::string(FlatBuffersGeneratedWarning()); @@ -261,8 +259,7 @@ class CppGenerator : public BaseGenerator { } } - assert(cur_name_space_); - SetNameSpace(nullptr); + if (cur_name_space_) SetNameSpace(nullptr); // Close the include guard. code_ += "#endif // " + include_guard; |