mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-13 00:04:29 +00:00
Fix C# vector of enum code generation
Fixes a bug where the logic to determine when to use a C# enum flags both enums and vectors of enums. This causes the C# generator to generate code that doesn't compile for tables that contain vectors of enums. The fix also consolidates type generation functions a bit and adds some additional casting functions for clarity.
This commit is contained in:
@@ -29,7 +29,7 @@ public sealed class Vec3 : Struct {
|
||||
builder.PutSbyte(test3_B);
|
||||
builder.PutShort(test3_A);
|
||||
builder.Pad(1);
|
||||
builder.PutSbyte((sbyte)(Test2));
|
||||
builder.PutSbyte((sbyte)Test2);
|
||||
builder.PutDouble(Test1);
|
||||
builder.Pad(4);
|
||||
builder.PutFloat(Z);
|
||||
|
||||
Reference in New Issue
Block a user