mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Multiple schemas parsed by flatc are now parsed independently.
It used to be such that later schemas could depend on earlier schemas. This was a convenience from days before include files were implemented. Nowadays they cause subtle bugs rather than being useful, so this functionality has been removed. You now need to explicitly include files you depend upon. Change-Id: Id8292c3c621fc38fbd796da2d2cbdd63efc230d1 Tested: on Linux.
This commit is contained in:
@@ -1072,10 +1072,9 @@ bool Parser::SetRootType(const char *name) {
|
||||
}
|
||||
|
||||
void Parser::MarkGenerated() {
|
||||
// Since the Parser object retains definitions across files, we must
|
||||
// ensure we only output code for definitions once, in the file they are first
|
||||
// declared. This function marks all existing definitions as having already
|
||||
// been generated.
|
||||
// This function marks all existing definitions as having already
|
||||
// been generated, which signals no code for included files should be
|
||||
// generated.
|
||||
for (auto it = enums_.vec.begin();
|
||||
it != enums_.vec.end(); ++it) {
|
||||
(*it)->generated = true;
|
||||
|
||||
Reference in New Issue
Block a user