Skip to content

Commit 6c64e45

Browse files
committed
React to compiler and ref readonly changes
1 parent 177cc7c commit 6c64e45

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasick.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private readonly int IndexOfAnyCore<TCaseSensitivity, TFastScanVariant>(ReadOnly
101101
int offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized<IndexOfAnyAsciiSearcher.DontNegate, IndexOfAnyAsciiSearcher.Default>(
102102
ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)),
103103
remainingLength,
104-
ref Unsafe.AsRef(_startingCharsAsciiBitmap));
104+
ref Unsafe.AsRef(in _startingCharsAsciiBitmap));
105105

106106
if (offset < 0)
107107
{
@@ -210,7 +210,7 @@ private readonly int IndexOfAnyCaseInsensitiveUnicode<TFastScanVariant>(ReadOnly
210210
int offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized<IndexOfAnyAsciiSearcher.DontNegate, IndexOfAnyAsciiSearcher.Default>(
211211
ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)),
212212
remainingLength,
213-
ref Unsafe.AsRef(_startingCharsAsciiBitmap));
213+
ref Unsafe.AsRef(in _startingCharsAsciiBitmap));
214214

215215
if (offset < 0)
216216
{

src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/EightPackedReferences.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
namespace System.Buffers
88
{
99
[InlineArray(8)]
10-
internal readonly struct EightPackedReferences
10+
internal struct EightPackedReferences
1111
{
1212
#pragma warning disable CA1823 // Unused field -- https://github.com/dotnet/roslyn-analyzers/issues/6788
13-
private readonly object? _ref0;
13+
private object? _ref0;
1414
#pragma warning restore CA1823
1515

1616
public EightPackedReferences(ReadOnlySpan<object> values)

src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValues.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static SearchValues<string> Create(ReadOnlySpan<string> values, bool igno
3434
ArgumentNullException.ThrowIfNull(value, nameof(values));
3535
string normalizedValue = NormalizeIfNeeded(value, ignoreCase);
3636

37-
AnalyzeValues(new ReadOnlySpan<string>(normalizedValue), ref ignoreCase, out bool ascii, out bool asciiLettersOnly, out _, out _);
37+
AnalyzeValues(new ReadOnlySpan<string>(ref normalizedValue), ref ignoreCase, out bool ascii, out bool asciiLettersOnly, out _, out _);
3838
return CreateForSingleValue(normalizedValue, uniqueValues: null, ignoreCase, ascii, asciiLettersOnly);
3939
}
4040

0 commit comments

Comments
 (0)