C# performance optimization to Pad/Prep methods

This commit is contained in:
Oli Wilkinson
2015-12-12 11:39:57 -05:00
parent b8187e5b82
commit be11d2b6ef
2 changed files with 10 additions and 5 deletions

View File

@@ -146,6 +146,13 @@ namespace FlatBuffers
_buffer[offset] = value;
}
public void PutByte(int offset, byte value, int count)
{
AssertOffsetAndLength(offset, sizeof(byte) * count);
for (var i = 0; i < count; ++i)
_buffer[offset + i] = value;
}
// this method exists in order to conform with Java ByteBuffer standards
public void Put(int offset, byte value)
{