diff options
author | Tarek Mahmoud Sayed <tarekms@microsoft.com> | 2018-03-09 00:56:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 00:56:43 +0300 |
commit | 8ad2b10cff945e4428520c6932e8de499af2931b (patch) | |
tree | e64ed486443af02ce979036382c4dd23117c158e /src/System.Private.Xml | |
parent | 8b0d0f03f9ed6bd5c4be79af6105372d119e58c8 (diff) |
Collapse AsSpan().Slice(...) into .AsSpan(...) (#27867)
Diffstat (limited to 'src/System.Private.Xml')
-rw-r--r-- | src/System.Private.Xml/src/System/Xml/NameTable.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.Xml/src/System/Xml/NameTable.cs b/src/System.Private.Xml/src/System/Xml/NameTable.cs index 7bd857fc88..60ab26f557 100644 --- a/src/System.Private.Xml/src/System/Xml/NameTable.cs +++ b/src/System.Private.Xml/src/System/Xml/NameTable.cs @@ -197,7 +197,7 @@ namespace System.Xml Entry[] oldEntries = _entries; Entry[] newEntries = new Entry[newMask + 1]; - // use oldEntries.Length to eliminate the range check + // use oldEntries.Length to eliminate the range check for (int i = 0; i < oldEntries.Length; i++) { Entry e = oldEntries[i]; @@ -240,7 +240,7 @@ namespace System.Xml private static int ComputeHash32(char[] key, int start, int len) { - ReadOnlySpan<byte> bytes = key.AsSpan().Slice(start, len).AsBytes(); + ReadOnlySpan<byte> bytes = key.AsSpan(start, len).AsBytes(); return Marvin.ComputeHash32(bytes, Marvin.DefaultSeed); } } |