Skip to content

Commit 815b1e6

Browse files
Use nint
1 parent 2cf5aea commit 815b1e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ImageSharp.Drawing/Shapes/Rasterization/SharpBlazeScanner.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal static class SharpBlazeScanner
1919

2020
private const int FixedShift = 8;
2121
private const int FixedOne = 1 << FixedShift;
22-
private static readonly int WordBitCount = IntPtr.Size * 8;
22+
private static readonly int WordBitCount = nint.Size * 8;
2323
private const int AreaToCoverageShift = 9;
2424
private const int CoverageStepCount = 256;
2525
private const int EvenOddMask = (CoverageStepCount * 2) - 1;
@@ -123,7 +123,7 @@ private static bool TryGetBandHeight(int width, int height, int wordsPerRow, lon
123123
}
124124

125125
long bytesPerRow =
126-
((long)wordsPerRow * IntPtr.Size) +
126+
((long)wordsPerRow * nint.Size) +
127127
(coverStride * sizeof(int)) +
128128
sizeof(int);
129129

@@ -227,11 +227,11 @@ private static int FindAdjustment(int value)
227227

228228
[MethodImpl(MethodImplOptions.AggressiveInlining)]
229229
private static int TrailingZeroCount(nuint value)
230-
=> IntPtr.Size == sizeof(ulong)
230+
=> nint.Size == sizeof(ulong)
231231
? BitOperations.TrailingZeroCount((ulong)value)
232232
: BitOperations.TrailingZeroCount((uint)value);
233233

234-
private ref struct Context
234+
private readonly ref struct Context
235235
{
236236
private readonly Span<nuint> bitVectors;
237237
private readonly Span<int> coverArea;

0 commit comments

Comments
 (0)