mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-13 16:15:26 +00:00
Implement --file-names-only (#8788)
* flatc builds and seems to work, some of the extra targets are having linker errors * fix build system * pipeline failures * un-rename files * refactor to use unique_ptr * typo * rm make_unique, add comments * fix cmake --------- Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
@@ -178,7 +178,7 @@ class TsGenerator : public BaseGenerator {
|
||||
EnsureDirExists(dirs);
|
||||
auto basename = dirs + namer_.File(definition, SkipFile::Suffix);
|
||||
|
||||
return SaveFile(basename.c_str(), code, false);
|
||||
return parser_.opts.file_saver->SaveFile(basename.c_str(), code, false);
|
||||
}
|
||||
|
||||
void TrackNsDef(const Definition& definition, std::string type_name) {
|
||||
@@ -319,7 +319,9 @@ class TsGenerator : public BaseGenerator {
|
||||
export_counter++;
|
||||
}
|
||||
|
||||
if (export_counter > 0) SaveFile(it.second.filepath.c_str(), code, false);
|
||||
if (export_counter > 0)
|
||||
parser_.opts.file_saver->SaveFile(it.second.filepath.c_str(), code,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user