mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
Added --filename-suffix and --filename-ext to flatc (#5778)
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case. * Added --filename-suffix and --filename-ext to flatc * Fixed typo and added example generation of suffix and extension for C++ * Removed extra ; * Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block * Added docs, fixed pointer alignment, removed suffix test file
This commit is contained in:
@@ -99,7 +99,9 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name) {
|
||||
for (auto enum_def_it = parser.enums_.vec.begin();
|
||||
enum_def_it != parser.enums_.vec.end(); ++enum_def_it) {
|
||||
EnumDef &enum_def = **enum_def_it;
|
||||
if (parser.opts.include_dependence_headers && enum_def.generated) { continue; }
|
||||
if (parser.opts.include_dependence_headers && enum_def.generated) {
|
||||
continue;
|
||||
}
|
||||
GenNameSpace(*enum_def.defined_namespace, &schema, &last_namespace);
|
||||
GenComment(enum_def.doc_comment, &schema, nullptr);
|
||||
if (enum_def.is_union)
|
||||
@@ -121,7 +123,9 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name) {
|
||||
for (auto it = parser.structs_.vec.begin(); it != parser.structs_.vec.end();
|
||||
++it) {
|
||||
StructDef &struct_def = **it;
|
||||
if (parser.opts.include_dependence_headers && struct_def.generated) { continue; }
|
||||
if (parser.opts.include_dependence_headers && struct_def.generated) {
|
||||
continue;
|
||||
}
|
||||
GenNameSpace(*struct_def.defined_namespace, &schema, &last_namespace);
|
||||
GenComment(struct_def.doc_comment, &schema, nullptr);
|
||||
schema += "table " + struct_def.name + " {\n";
|
||||
|
||||
Reference in New Issue
Block a user