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:
Donnell
2015-11-13 23:39:46 -05:00
committed by belldon
parent a7b5f92f51
commit 644bcbde91
7 changed files with 150 additions and 127 deletions

View File

@@ -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);