From cf8fce7df124220d1850de55f4313b77a3eb9d94 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Wed, 6 Sep 2017 22:54:46 +0200 Subject: [PATCH] Silence warnings. --- src/ImageSharp/Formats/Gif/GifEncoder.cs | 2 +- .../Processing/Processors/CloningImageProcessor.cs | 2 +- src/ImageSharp/Processing/Processors/ImageProcessor.cs | 2 +- tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ImageSharp/Formats/Gif/GifEncoder.cs b/src/ImageSharp/Formats/Gif/GifEncoder.cs index 2c3bb29299..ccf46a17d6 100644 --- a/src/ImageSharp/Formats/Gif/GifEncoder.cs +++ b/src/ImageSharp/Formats/Gif/GifEncoder.cs @@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Formats.Gif public void Encode(Image image, Stream stream) where TPixel : struct, IPixel { - GifEncoderCore encoder = new GifEncoderCore(this); + var encoder = new GifEncoderCore(this); encoder.Encode(image, stream); } } diff --git a/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs b/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs index fdd7ae17cd..fdee21ed6a 100644 --- a/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs +++ b/src/ImageSharp/Processing/Processors/CloningImageProcessor.cs @@ -27,7 +27,7 @@ namespace SixLabors.ImageSharp.Processing throw new ImageProcessingException($"An error occured when processing the image using {this.GetType().Name}. The processor changed the number of frames."); } - var configuration = source.GetConfiguration(); + Configuration configuration = source.GetConfiguration(); this.BeforeImageApply(source, clone, sourceRectangle); for (int i = 0; i < source.Frames.Count; i++) diff --git a/src/ImageSharp/Processing/Processors/ImageProcessor.cs b/src/ImageSharp/Processing/Processors/ImageProcessor.cs index 993bbe54b8..cab99112c1 100644 --- a/src/ImageSharp/Processing/Processors/ImageProcessor.cs +++ b/src/ImageSharp/Processing/Processors/ImageProcessor.cs @@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Processing { try { - var config = source.GetConfiguration(); + Configuration config = source.GetConfiguration(); this.BeforeImageApply(source, sourceRectangle); foreach (ImageFrame sourceFrame in source.Frames) diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs index 5380807562..1566ddf442 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs @@ -28,10 +28,10 @@ namespace SixLabors.ImageSharp.Tests { using (Image image = provider.GetImage()) { - PngEncoder options = new PngEncoder() - { - PngColorType = pngColorType - }; + var options = new PngEncoder() + { + PngColorType = pngColorType + }; provider.Utility.TestName += "_" + pngColorType; provider.Utility.SaveTestOutputFile(image, "png", options); @@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Tests where TPixel : struct, IPixel { using (Image image = provider.GetImage()) - using (MemoryStream ms = new MemoryStream()) + using (var ms = new MemoryStream()) { image.Save(ms, new PngEncoder());