mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Merge pull request #3839 from klapek/net/bytebuffer-assert-optimization
Remove unnecessary condition in AssertOffsetAndLength.
This commit is contained in:
@@ -129,8 +129,7 @@ namespace FlatBuffers
|
||||
private void AssertOffsetAndLength(int offset, int length)
|
||||
{
|
||||
if (offset < 0 ||
|
||||
offset >= _buffer.Length ||
|
||||
offset + length > _buffer.Length)
|
||||
offset > _buffer.Length - length)
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user