提交 82bd67f7 编写于 作者: A Ahson Khan 提交者: GitHub

Workaround to remove unnecessary bounds checks when using...

Workaround to remove unnecessary bounds checks when using {ReadOnly}Span.IsEmpty (dotnet/coreclr#19640)



Commit migrated from https://github.com/dotnet/coreclr/commit/3ce59b1ab67fcf7c23c9fbc5da9b229f54568414
上级 0b435472
......@@ -40,7 +40,8 @@ public bool IsEmpty
[NonVersionable]
get
{
return _length == 0;
// Workaround for https://github.com/dotnet/coreclr/issues/19620
return 0 >= (uint)_length;
}
}
/// <summary>
......
......@@ -40,7 +40,8 @@ public bool IsEmpty
[NonVersionable]
get
{
return _length == 0;
// Workaround for https://github.com/dotnet/coreclr/issues/19620
return 0 >= (uint)_length;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册