Skip to content

Commit b84defa

Browse files
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 099c0e1 commit b84defa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Microsoft.OData.Core/Json/JsonReader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,8 +1561,8 @@ private bool SkipWhitespaces()
15611561
// Find the exact position within this vector
15621562
for (int i = 0; i < vectorSize; i++)
15631563
{
1564-
// 0 means NOT whitespace
1565-
if (isWhitespace[i] == 0)
1564+
// ushort.MinValue (0) means NOT whitespace
1565+
if (isWhitespace[i] == ushort.MinValue)
15661566
{
15671567
this.tokenStartIndex += (processedVectors * vectorSize) + i;
15681568

@@ -2613,7 +2613,7 @@ private static int SkipWhitespacesVectorized(ReadOnlySpan<char> span, int vector
26132613
{
26142614
// Load vector from char buffer
26152615
Vector<ushort> currentVector = new Vector<ushort>(MemoryMarshal.Cast<char, ushort>(span.Slice(processed)));
2616-
2616+
if (isWhitespace[i] == ushort.MinValue)
26172617
Vector<ushort> isWhitespace = Vector.Equals(currentVector, spaceCharVector) |
26182618
Vector.Equals(currentVector, tabCharVector) |
26192619
Vector.Equals(currentVector, newlineCharVector) |

0 commit comments

Comments
 (0)