mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 21:52:18 +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)
|
private void AssertOffsetAndLength(int offset, int length)
|
||||||
{
|
{
|
||||||
if (offset < 0 ||
|
if (offset < 0 ||
|
||||||
offset >= _buffer.Length ||
|
offset > _buffer.Length - length)
|
||||||
offset + length > _buffer.Length)
|
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user