mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Refactor FlatC to receive FlatCOptions (#7770)
* Refactor FlatC to receive `FlatCOptions` * switch to c++11 unique_ptr
This commit is contained in:
@@ -158,5 +158,11 @@ int main(int argc, const char *argv[]) {
|
||||
params.error_fn = Error;
|
||||
|
||||
flatbuffers::FlatCompiler flatc(params);
|
||||
return flatc.Compile(argc, argv);
|
||||
|
||||
// Create the FlatC options by parsing the command line arguments.
|
||||
const flatbuffers::FlatCOptions &options =
|
||||
flatc.ParseFromCommandLineArguments(argc, argv);
|
||||
|
||||
// Compile with the extracted FlatC options.
|
||||
return flatc.Compile(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user