mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 07:41:12 +00:00
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
This commit is contained in:
@@ -25,7 +25,7 @@ namespace FlatBuffers
|
|||||||
public ByteBuffer bb { get; private set; }
|
public ByteBuffer bb { get; private set; }
|
||||||
|
|
||||||
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
|
// 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 = _bb;
|
||||||
bb_pos = _i;
|
bb_pos = _i;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace FlatBuffers
|
|||||||
public ByteBuffer ByteBuffer { get { return bb; } }
|
public ByteBuffer ByteBuffer { get { return bb; } }
|
||||||
|
|
||||||
// Re-init the internal state with an external buffer {@code ByteBuffer} and an offset within.
|
// 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 = _bb;
|
||||||
bb_pos = _i;
|
bb_pos = _i;
|
||||||
|
|||||||
Reference in New Issue
Block a user