未验证 提交 2740fbbe 编写于 作者: S Stephen Toub 提交者: GitHub

Cast to uint instead of nuint in {ReadOnly}Span.{Try}CopyTo (#51083)

上级 9bb0427e
......@@ -274,7 +274,7 @@ public void CopyTo(Span<T> destination)
if ((uint)_length <= (uint)destination.Length)
{
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (nuint)_length);
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (uint)_length);
}
else
{
......@@ -295,7 +295,7 @@ public bool TryCopyTo(Span<T> destination)
bool retVal = false;
if ((uint)_length <= (uint)destination.Length)
{
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (nuint)_length);
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (uint)_length);
retVal = true;
}
return retVal;
......
......@@ -348,7 +348,7 @@ public void CopyTo(Span<T> destination)
if ((uint)_length <= (uint)destination.Length)
{
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (nuint)_length);
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (uint)_length);
}
else
{
......@@ -369,7 +369,7 @@ public bool TryCopyTo(Span<T> destination)
bool retVal = false;
if ((uint)_length <= (uint)destination.Length)
{
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (nuint)_length);
Buffer.Memmove(ref destination._pointer.Value, ref _pointer.Value, (uint)_length);
retVal = true;
}
return retVal;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册