mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 16:36:55 +00:00
Mono Fix for Unsafe Mode (#4887)
* Added preprocessor define for C++ if Template Aliases are supported by the compiler * Revert "Revert "Performance Increase of Vector of Structures using .NET BlockCopy (#4830)"" This reverts commit1f5eae5d6a. * Put<T> method was inside #if UNSAFE_BYTEBUFFER which caused compilation failure when building in unsafe mode * Revert "Added preprocessor define for C++ if Template Aliases are supported by the compiler" This reverts commita75af73521.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
1f5eae5d6a
commit
d8f49e18d7
@@ -19,6 +19,7 @@ public struct Stat : IFlatbufferObject
|
||||
|
||||
public string Id { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
||||
public ArraySegment<byte>? GetIdBytes() { return __p.__vector_as_arraysegment(4); }
|
||||
public byte[] GetIdArray() { return __p.__vector_as_array<byte>(4); }
|
||||
public long Val { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
||||
public bool MutateVal(long val) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutLong(o + __p.bb_pos, val); return true; } else { return false; } }
|
||||
public ushort Count { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } }
|
||||
|
||||
Reference in New Issue
Block a user