[C#] Remove superfluous semicolon in C# structs (#6791)
authorTodd Hansen <32498632+thansen24@users.noreply.github.com>
Tue, 17 Aug 2021 15:02:57 +0000 (10:02 -0500)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 15:02:57 +0000 (11:02 -0400)
Aims to resolve #6788

-Remove superfluous semicolon in C# structs

27 files changed:
src/idl_gen_csharp.cpp
tests/MyGame/Example/Ability.cs
tests/MyGame/Example/ArrayStruct.cs
tests/MyGame/Example/ArrayTable.cs
tests/MyGame/Example/Monster.cs
tests/MyGame/Example/NestedStruct.cs
tests/MyGame/Example/Referrable.cs
tests/MyGame/Example/Stat.cs
tests/MyGame/Example/StructOfStructs.cs
tests/MyGame/Example/Test.cs
tests/MyGame/Example/TestSimpleTableWithEnum.cs
tests/MyGame/Example/TypeAliases.cs
tests/MyGame/Example/Vec3.cs
tests/MyGame/Example2/Monster.cs
tests/MyGame/InParentNamespace.cs
tests/MyGame/MonsterExtra.cs
tests/keyword_test/KeywordsInTable.cs
tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.cs
tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs
tests/namespace_test/NamespaceA/SecondTableInA.cs
tests/namespace_test/NamespaceA/TableInFirstNS.cs
tests/namespace_test/NamespaceC/TableInC.cs
tests/optional_scalars/ScalarStuff.cs
tests/union_vector/Attacker.cs
tests/union_vector/BookReader.cs
tests/union_vector/Movie.cs
tests/union_vector/Rapunzel.cs

index 2b04253..fe90979 100644 (file)
@@ -1335,7 +1335,7 @@ class CSharpGenerator : public BaseGenerator {
       GenPackUnPack_ObjectAPI(struct_def, code_ptr, opts, struct_has_create,
                               field_has_create_set);
     }
-    code += "};\n\n";
+    code += "}\n\n";
 
     if (opts.generate_object_based_api) {
       GenStruct_ObjectAPI(struct_def, code_ptr, opts);
index bd49ccd..ae6a5b4 100644 (file)
@@ -43,7 +43,7 @@ public struct Ability : IFlatbufferObject
       _o.Id,
       _o.Distance);
   }
-};
+}
 
 public class AbilityT
 {
index 41c088d..df0e2ac 100644 (file)
@@ -97,7 +97,7 @@ public struct ArrayStruct : IFlatbufferObject
       _o.E,
       _f);
   }
-};
+}
 
 public class ArrayStructT
 {
index f622df5..9dc3d45 100644 (file)
@@ -44,7 +44,7 @@ public struct ArrayTable : IFlatbufferObject
     AddA(builder, MyGame.Example.ArrayStruct.Pack(builder, _o.A));
     return EndArrayTable(builder);
   }
-};
+}
 
 public class ArrayTableT
 {
index d2f89c2..ccf84fc 100644 (file)
@@ -741,7 +741,7 @@ public struct Monster : IFlatbufferObject
       _testrequirednestedflatbuffer,
       _scalar_key_sorted_tables);
   }
-};
+}
 
 public class MonsterT
 {
index 13e3498..f323342 100644 (file)
@@ -66,7 +66,7 @@ public struct NestedStruct : IFlatbufferObject
       _c,
       _d);
   }
-};
+}
 
 public class NestedStructT
 {
index 0c6584b..e6f3146 100644 (file)
@@ -74,7 +74,7 @@ public struct Referrable : IFlatbufferObject
       builder,
       _o.Id);
   }
-};
+}
 
 public class ReferrableT
 {
index 809f587..149b136 100644 (file)
@@ -94,7 +94,7 @@ public struct Stat : IFlatbufferObject
       _o.Val,
       _o.Count);
   }
-};
+}
 
 public class StatT
 {
index cdd82fb..3a1607d 100644 (file)
@@ -61,7 +61,7 @@ public struct StructOfStructs : IFlatbufferObject
       _c_id,
       _c_distance);
   }
-};
+}
 
 public class StructOfStructsT
 {
index a6419ed..a805218 100644 (file)
@@ -44,7 +44,7 @@ public struct Test : IFlatbufferObject
       _o.A,
       _o.B);
   }
-};
+}
 
 public class TestT
 {
index bd1fba8..99a498b 100644 (file)
@@ -49,7 +49,7 @@ internal partial struct TestSimpleTableWithEnum : IFlatbufferObject
       builder,
       _o.Color);
   }
-};
+}
 
 internal partial class TestSimpleTableWithEnumT
 {
index 584cceb..1801dc8 100644 (file)
@@ -158,7 +158,7 @@ public struct TypeAliases : IFlatbufferObject
       _v8,
       _vf64);
   }
-};
+}
 
 public class TypeAliasesT
 {
index 54fc8f9..31c9f7e 100644 (file)
@@ -71,7 +71,7 @@ public struct Vec3 : IFlatbufferObject
       _test3_a,
       _test3_b);
   }
-};
+}
 
 public class Vec3T
 {
index fc19160..3232bd6 100644 (file)
@@ -37,7 +37,7 @@ public struct Monster : IFlatbufferObject
     StartMonster(builder);
     return EndMonster(builder);
   }
-};
+}
 
 public class MonsterT
 {
index 163cd9c..b266aae 100644 (file)
@@ -37,7 +37,7 @@ public struct InParentNamespace : IFlatbufferObject
     StartInParentNamespace(builder);
     return EndInParentNamespace(builder);
   }
-};
+}
 
 public class InParentNamespaceT
 {
index f3d5573..6af9932 100644 (file)
@@ -147,7 +147,7 @@ public struct MonsterExtra : IFlatbufferObject
       _dvec,
       _fvec);
   }
-};
+}
 
 public class MonsterExtraT
 {
index aa2badc..fe91e8b 100644 (file)
@@ -53,7 +53,7 @@ public struct KeywordsInTable : IFlatbufferObject
       _o.Is,
       _o.Private);
   }
-};
+}
 
 public class KeywordsInTableT
 {
index 6fa9dd3..0ed6a63 100644 (file)
@@ -43,7 +43,7 @@ public struct StructInNestedNS : IFlatbufferObject
       _o.A,
       _o.B);
   }
-};
+}
 
 public class StructInNestedNST
 {
index b947166..9e67112 100644 (file)
@@ -49,7 +49,7 @@ public struct TableInNestedNS : IFlatbufferObject
       builder,
       _o.Foo);
   }
-};
+}
 
 public class TableInNestedNST
 {
index 3cad231..6e7ef88 100644 (file)
@@ -49,7 +49,7 @@ public struct SecondTableInA : IFlatbufferObject
       builder,
       _refer_to_c);
   }
-};
+}
 
 public class SecondTableInAT
 {
index 112d4e8..6522f49 100644 (file)
@@ -83,7 +83,7 @@ public struct TableInFirstNS : IFlatbufferObject
       _foo_union,
       _o.FooStruct);
   }
-};
+}
 
 public class TableInFirstNST
 {
index 2881003..2077e32 100644 (file)
@@ -56,7 +56,7 @@ public struct TableInC : IFlatbufferObject
       _refer_to_a1,
       _refer_to_a2);
   }
-};
+}
 
 public class TableInCT
 {
index 9b48e47..f7ad73a 100644 (file)
@@ -261,7 +261,7 @@ public struct ScalarStuff : IFlatbufferObject
       _o.MaybeEnum,
       _o.DefaultEnum);
   }
-};
+}
 
 public class ScalarStuffT
 {
index d5bb81b..cf6d1a7 100644 (file)
@@ -46,7 +46,7 @@ public struct Attacker : IFlatbufferObject
       builder,
       _o.SwordAttackDamage);
   }
-};
+}
 
 public class AttackerT
 {
index 3f80cdf..6cd88b3 100644 (file)
@@ -35,7 +35,7 @@ public struct BookReader : IFlatbufferObject
       builder,
       _o.BooksRead);
   }
-};
+}
 
 public class BookReaderT
 {
index bfbc10d..f85daa6 100644 (file)
@@ -148,7 +148,7 @@ public struct Movie : IFlatbufferObject
       _characters_type,
       _characters);
   }
-};
+}
 
 public class MovieT
 {
index e5ffff8..31d2cdf 100644 (file)
@@ -35,7 +35,7 @@ public struct Rapunzel : IFlatbufferObject
       builder,
       _o.HairLength);
   }
-};
+}
 
 public class RapunzelT
 {