Skip to content

Commit f7b4f49

Browse files
committed
Fixing StyleCop
1 parent bf9f1f3 commit f7b4f49

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/ImageSharp/Common/Helpers/Numerics.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,25 @@ public static int LeastCommonMultiple(int a, int b)
7777
/// Calculates <paramref name="x"/> % 64
7878
/// </summary>
7979
[MethodImpl(MethodImplOptions.AggressiveInlining)]
80-
public static int Modulo64(int value) => value & 63;
80+
public static int Modulo64(int x) => x & 63;
8181

8282
/// <summary>
8383
/// Calculates <paramref name="x"/> % 64
8484
/// </summary>
8585
[MethodImpl(MethodImplOptions.AggressiveInlining)]
86-
public static nint Modulo64(nint value) => value & 63;
86+
public static nint Modulo64(nint x) => x & 63;
8787

8888
/// <summary>
8989
/// Calculates <paramref name="x"/> % 256
9090
/// </summary>
9191
[MethodImpl(MethodImplOptions.AggressiveInlining)]
92-
public static int Modulo256(int value) => value & 255;
92+
public static int Modulo256(int x) => x & 255;
9393

9494
/// <summary>
9595
/// Calculates <paramref name="x"/> % 256
9696
/// </summary>
9797
[MethodImpl(MethodImplOptions.AggressiveInlining)]
98-
public static nint Modulo256(nint value) => value & 255;
98+
public static nint Modulo256(nint x) => x & 255;
9999

100100
/// <summary>
101101
/// Fast (x mod m) calculator, with the restriction that
@@ -1063,5 +1063,4 @@ public static nuint Vector256Count<TVector>(this Span<float> span)
10631063
public static nuint Vector256Count<TVector>(int length)
10641064
where TVector : struct
10651065
=> (uint)length / (uint)Vector256<TVector>.Count;
1066-
10671066
}

src/ImageSharp/Formats/Qoi/QoiDecoderCore.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ private void ProcessPixels<TPixel>(BufferedReadStream stream, Buffer2D<TPixel> p
146146
{
147147
using IMemoryOwner<Rgba32> previouslySeenPixelsBuffer = this.memoryAllocator.Allocate<Rgba32>(64, AllocationOptions.Clean);
148148
Span<Rgba32> previouslySeenPixels = previouslySeenPixelsBuffer.GetSpan();
149-
//Rgba32[] previouslySeenPixels = new Rgba32[64];
150149
Rgba32 previousPixel = new(0, 0, 0, 255);
151150

152151
// We save the pixel to avoid loosing the fully opaque black pixel

src/ImageSharp/Formats/Qoi/QoiEncoder.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
using System.Text;
54
using SixLabors.ImageSharp.Advanced;
65

76
namespace SixLabors.ImageSharp.Formats.Qoi;

src/ImageSharp/Formats/Qoi/QoiEncoderCore.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ namespace SixLabors.ImageSharp.Formats.Qoi;
1414
/// </summary>
1515
public class QoiEncoderCore : IImageEncoderInternals
1616
{
17+
/// <summary>
18+
/// The encoder with options
19+
/// </summary>
1720
private readonly QoiEncoder encoder;
21+
22+
/// <summary>
23+
/// Used the manage memory allocations.
24+
/// </summary>
1825
private readonly MemoryAllocator memoryAllocator;
1926

2027
/// <summary>
2128
/// Initializes a new instance of the <see cref="QoiEncoderCore"/> class.
2229
/// </summary>
30+
/// <param name="encoder">The encoder with options.</param>
31+
/// <param name="memoryAllocator">The <see cref="MemoryAllocator" /> to use for buffer allocations.</param>
2332
public QoiEncoderCore(QoiEncoder encoder, MemoryAllocator memoryAllocator)
2433
{
2534
this.encoder = encoder;
@@ -101,10 +110,10 @@ private void WritePixels<TPixel>(Image<TPixel> image, Stream stream)
101110
{
102111
break;
103112
}
113+
104114
row = pixels.DangerousGetRowSpan(i);
105115
}
106116

107-
108117
currentPixel = row[j];
109118
currentPixel.ToRgba32(ref currentRgba32);
110119
}

0 commit comments

Comments
 (0)