mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Made codegen always output a file, even on an empty schema.
Previously, we had a check to simply skip such files, but this tends to make build systems unhappy. This only affects C++ and JS, since other language output per-class files. Change-Id: I54224642725bbafb9f6e1654ed3693e62ca9f7d7 Tested: on Linux.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user