Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/idl_gen_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ class TsGenerator : public BaseGenerator {
it != struct_def.fields.vec.end(); ++it) {
auto &field = **it;
if (!field.deprecated && field.IsRequired()) {
code += " builder.IsRequired()Field(offset, ";
code += " builder.requiredField(offset, ";
code += NumToString(field.value.offset);
code += ") // " + field.name + "\n";
}
Expand Down
9 changes: 0 additions & 9 deletions tests/namespace_test/namespace_test1_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return StructInNestedNSTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.NamespaceB.StructInNestedNS";
}
StructInNestedNS()
: a_(0),
b_(0) {
Expand Down Expand Up @@ -209,9 +206,6 @@ inline bool operator!=(const StructInNestedNS &lhs, const StructInNestedNS &rhs)

struct TableInNestedNST : public flatbuffers::NativeTable {
typedef TableInNestedNS TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.NamespaceB.TableInNestedNST";
}
int32_t foo = 0;
};

Expand All @@ -231,9 +225,6 @@ struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return TableInNestedNSTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.NamespaceB.TableInNestedNS";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_FOO = 4
};
Expand Down
18 changes: 0 additions & 18 deletions tests/namespace_test/namespace_test2_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ inline const flatbuffers::TypeTable *SecondTableInATypeTable();

struct TableInFirstNST : public flatbuffers::NativeTable {
typedef TableInFirstNS TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.TableInFirstNST";
}
flatbuffers::unique_ptr<NamespaceA::NamespaceB::TableInNestedNST> foo_table{};
NamespaceA::NamespaceB::EnumInNestedNS foo_enum = NamespaceA::NamespaceB::EnumInNestedNS_A;
NamespaceA::NamespaceB::UnionInNestedNSUnion foo_union{};
Expand All @@ -87,9 +84,6 @@ struct TableInFirstNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return TableInFirstNSTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.TableInFirstNS";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_FOO_TABLE = 4,
VT_FOO_ENUM = 6,
Expand Down Expand Up @@ -202,9 +196,6 @@ namespace NamespaceC {

struct TableInCT : public flatbuffers::NativeTable {
typedef TableInC TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceC.TableInCT";
}
flatbuffers::unique_ptr<NamespaceA::TableInFirstNST> refer_to_a1{};
flatbuffers::unique_ptr<NamespaceA::SecondTableInAT> refer_to_a2{};
};
Expand All @@ -226,9 +217,6 @@ struct TableInC FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return TableInCTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceC.TableInC";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_REFER_TO_A1 = 4,
VT_REFER_TO_A2 = 6
Expand Down Expand Up @@ -297,9 +285,6 @@ namespace NamespaceA {

struct SecondTableInAT : public flatbuffers::NativeTable {
typedef SecondTableInA TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.SecondTableInAT";
}
flatbuffers::unique_ptr<NamespaceC::TableInCT> refer_to_c{};
};

Expand All @@ -319,9 +304,6 @@ struct SecondTableInA FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return SecondTableInATypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "NamespaceA.SecondTableInA";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_REFER_TO_C = 4
};
Expand Down
18 changes: 0 additions & 18 deletions tests/union_vector/union_vector_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Rapunzel FLATBUFFERS_FINAL_CLASS {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return RapunzelTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "Rapunzel";
}
Rapunzel()
: hair_length_(0) {
}
Expand Down Expand Up @@ -238,9 +235,6 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return BookReaderTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "BookReader";
}
BookReader()
: books_read_(0) {
}
Expand Down Expand Up @@ -268,9 +262,6 @@ inline bool operator!=(const BookReader &lhs, const BookReader &rhs) {

struct AttackerT : public flatbuffers::NativeTable {
typedef Attacker TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "AttackerT";
}
int32_t sword_attack_damage = 0;
};

Expand All @@ -290,9 +281,6 @@ struct Attacker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return AttackerTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "Attacker";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_SWORD_ATTACK_DAMAGE = 4
};
Expand Down Expand Up @@ -342,9 +330,6 @@ flatbuffers::Offset<Attacker> CreateAttacker(flatbuffers::FlatBufferBuilder &_fb

struct MovieT : public flatbuffers::NativeTable {
typedef Movie TableType;
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "MovieT";
}
CharacterUnion main_character{};
std::vector<CharacterUnion> characters{};
};
Expand All @@ -366,9 +351,6 @@ struct Movie FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return MovieTypeTable();
}
static FLATBUFFERS_CONSTEXPR const char *GetFullyQualifiedName() {
return "Movie";
}
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_MAIN_CHARACTER_TYPE = 4,
VT_MAIN_CHARACTER = 6,
Expand Down