From fe2935bcf20193fc911bbe7fe96b377b8ef67669 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 12 Dec 2016 11:27:55 +0100 Subject: [PATCH] Various StyleCop fixes. --- src/ImageSharp/Formats/Jpg/Components/Bytes.cs | 1 + src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 4 +--- src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index 9a49665d2..796ef1804 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -49,6 +49,7 @@ namespace ImageSharp.Formats { ArrayPool.Return(this.Buffer); } + this.Buffer = null; } diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 3362b332d..d12217cf5 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -225,7 +225,6 @@ namespace ImageSharp.Formats internal enum ErrorCodes { NoError, - // ReSharper disable once InconsistentNaming MissingFF00 } @@ -1553,7 +1552,6 @@ namespace ImageSharp.Formats var qtIndex = this.componentArray[compIndex].Selector; // TODO: Find a way to clean up this mess - fixed (Block8x8F* qtp = &this.quantizationTables[qtIndex]) { // Load the previous partially decoded coefficients, if applicable. @@ -1809,7 +1807,6 @@ namespace ImageSharp.Formats } // Level shift by +128, clip to [0, 255], and write to dst. - temp1->CopyColorsTo(new MutableSpan(dst, offset), stride, temp2); } @@ -1898,6 +1895,7 @@ namespace ImageSharp.Formats // int stuff = (int)b[0]; stuff |= delta; + // b[0] = stuff; Block8x8F.SetScalarAt(b, 0, stuff); } diff --git a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs index c0a6a765b..8247bb867 100644 --- a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs @@ -246,9 +246,7 @@ namespace ImageSharp.Formats /// /// The AC luminance huffman table index /// - LuminanceAC = 1, - // ReSharper restore UnusedMember.Local /// /// The DC chrominance huffman table index