diff options
author | Ahson Khan <ahkha@microsoft.com> | 2018-03-26 08:19:11 +0300 |
---|---|---|
committer | Ahson Khan <ahkha@microsoft.com> | 2018-03-26 22:37:59 +0300 |
commit | 032ac7c0ea339c313cba44b5a464e5e153a95ca8 (patch) | |
tree | 7653218ec8816d7c7facb7b678e2282415e3094a /src | |
parent | 73b8d8fd1a5f5a8ebc9fd8c3573b6ade2e39d987 (diff) |
Update uses of AsBytes to use MemoryMarshal.AsBytes (dotnet/corefx#28460)
* Update uses of AsBytes to use MemoryMarshal.AsBytes
* Cleanup commented out code
* Remove AsBytes from MemoryExtensions Portable
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs b/src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs index 71dc270bc..4ccd739bc 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs @@ -1249,7 +1249,7 @@ namespace System.Globalization int charsWritten = source.AsSpan().ToUpperInvariant(span); // Slice the array to the size returned by ToUpperInvariant. - int hash = Marvin.ComputeHash32(span.Slice(0, charsWritten).AsBytes(), Marvin.DefaultSeed); + int hash = Marvin.ComputeHash32(MemoryMarshal.AsBytes(span.Slice(0, charsWritten)), Marvin.DefaultSeed); // Return the borrowed array if necessary. if (borrowedArr != null) |