diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-12-23 17:35:54 -0800 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-12-23 17:35:54 -0800 |
commit | 3a70e0b30890ca265a33f099912762eb51ac505f (patch) | |
tree | 7c5c2661a2cdefa6e1533e9435a03b231d5234a9 /net/FlatBuffers | |
parent | 9b132013565b702576e5e883d3d732f2b590e244 (diff) | |
download | flatbuffers-3a70e0b30890ca265a33f099912762eb51ac505f.tar.gz flatbuffers-3a70e0b30890ca265a33f099912762eb51ac505f.tar.bz2 flatbuffers-3a70e0b30890ca265a33f099912762eb51ac505f.zip |
Fixed struct initialization error on older versions of C#
"'this' object cannot be used before all of its fields are assigned to"
Change-Id: Icccdcc0d0be0fe0b87abe0eb28fe1cc91116fcfb
Diffstat (limited to 'net/FlatBuffers')
-rw-r--r-- | net/FlatBuffers/Struct.cs | 2 | ||||
-rw-r--r-- | net/FlatBuffers/Table.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/FlatBuffers/Struct.cs b/net/FlatBuffers/Struct.cs index 4f7fac9d..4832cda3 100644 --- a/net/FlatBuffers/Struct.cs +++ b/net/FlatBuffers/Struct.cs @@ -25,7 +25,7 @@ namespace FlatBuffers public ByteBuffer bb { get; private set; } // Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within. - public Struct(int _i, ByteBuffer _bb) + public Struct(int _i, ByteBuffer _bb) : this() { bb = _bb; bb_pos = _i; diff --git a/net/FlatBuffers/Table.cs b/net/FlatBuffers/Table.cs index b771ae2c..2ed07884 100644 --- a/net/FlatBuffers/Table.cs +++ b/net/FlatBuffers/Table.cs @@ -31,7 +31,7 @@ namespace FlatBuffers public ByteBuffer ByteBuffer { get { return bb; } } // Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within. - public Table(int _i, ByteBuffer _bb) + public Table(int _i, ByteBuffer _bb) : this() { bb = _bb; bb_pos = _i; |