Skip to content

Commit

Permalink
Use var instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jun 19, 2022
1 parent dc1940c commit 7803301
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Magick.NET/Optimizers/GifOptimizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public bool LosslessCompress(FileInfo file)
/// <returns>True when the image could be compressed otherwise false.</returns>
public bool LosslessCompress(string fileName)
{
string filePath = FileHelper.CheckForBaseDirectory(fileName);
var filePath = FileHelper.CheckForBaseDirectory(fileName);
Throw.IfNullOrEmpty(nameof(fileName), filePath);

return DoLosslessCompress(new FileInfo(filePath));
Expand All @@ -100,8 +100,8 @@ public bool LosslessCompress(Stream stream)
{
ImageOptimizerHelper.CheckStream(stream);

bool isCompressed = false;
long startPosition = stream.Position;
var isCompressed = false;
var startPosition = stream.Position;

using (var images = new MagickImageCollection(stream))
{
Expand Down Expand Up @@ -129,7 +129,7 @@ private static bool DoLosslessCompress(FileInfo file, IMagickImage<QuantumType>
{
ImageOptimizerHelper.CheckFormat(image, MagickFormat.Gif);

bool isCompressed = false;
var isCompressed = false;

using (var tempFile = new TemporaryFile())
{
Expand Down Expand Up @@ -157,7 +157,7 @@ private static bool DoLosslessCompress(IMagickImage<QuantumType> image, Stream s
{
ImageOptimizerHelper.CheckFormat(image, MagickFormat.Gif);

bool isCompressed = false;
var isCompressed = false;

using (var memStream = new MemoryStream())
{
Expand Down
2 changes: 1 addition & 1 deletion src/Magick.NET/Optimizers/PngOptimizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static void StartCompression(MagickImage image, bool lossless)

private bool DoCompress(FileInfo file, bool lossless)
{
bool isCompressed = false;
var isCompressed = false;

using (var image = new MagickImage(file))
{
Expand Down

0 comments on commit 7803301

Please sign in to comment.