From fecab7f03c525dc4d1f03011123a0ceb29e8ca09 Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Tue, 27 Mar 2018 12:32:17 -0700 Subject: [PATCH] Make STYLECOP happy --- src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs | 7 +++---- src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs | 3 +-- src/ImageSharp/Formats/Png/PngDecoderCore.cs | 3 +-- src/ImageSharp/Formats/Png/PngEncoderCore.cs | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs index 4b5b150c49..dfbd44c046 100644 --- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs @@ -224,7 +224,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp var color = default(TPixel); var rgba = new Rgba32(0, 0, 0, 255); - using (var buffer = this.memoryManager.AllocateClean2D(width, height)) + using (Buffer2D buffer = this.memoryManager.AllocateClean2D(width, height)) { this.UncompressRle8(width, buffer.Span); @@ -398,7 +398,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp var color = default(TPixel); var rgba = new Rgba32(0, 0, 0, 255); - using (var buffer = this.memoryManager.AllocateManagedByteBuffer(stride)) + using (IManagedByteBuffer buffer = this.memoryManager.AllocateManagedByteBuffer(stride)) { for (int y = 0; y < height; y++) { @@ -585,8 +585,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp type: BitConverter.ToInt16(data, 0), fileSize: BitConverter.ToInt32(data, 2), reserved: BitConverter.ToInt32(data, 6), - offset: BitConverter.ToInt32(data, 10) - ); + offset: BitConverter.ToInt32(data, 10)); } /// diff --git a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs index 7e4dfde596..be7c1d2e55 100644 --- a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs @@ -73,8 +73,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp type: 19778, // BM offset: 54, reserved: 0, - fileSize: 54 + infoHeader.ImageSize - ); + fileSize: 54 + infoHeader.ImageSize); WriteHeader(writer, fileHeader); this.WriteInfo(writer, infoHeader); diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs index 2186444739..234ed6bbd0 100644 --- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs @@ -1164,8 +1164,7 @@ namespace SixLabors.ImageSharp.Formats.Png colorType: (PngColorType)data[9], compressionMethod: data[10], filterMethod: data[11], - interlaceMethod: (PngInterlaceMode)data[12] - ); + interlaceMethod: (PngInterlaceMode)data[12]); } /// diff --git a/src/ImageSharp/Formats/Png/PngEncoderCore.cs b/src/ImageSharp/Formats/Png/PngEncoderCore.cs index 5f7cd9b23d..17aae17620 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderCore.cs @@ -219,8 +219,7 @@ namespace SixLabors.ImageSharp.Formats.Png bitDepth: this.bitDepth, filterMethod: 0, // None compressionMethod: 0, - interlaceMethod: 0 - ); + interlaceMethod: 0); this.WriteHeaderChunk(stream, header);