Remove unnecessary parentheses

This commit is contained in:
Gustas
2023-02-19 17:01:36 +02:00
committed by Pavel Penev
parent 157d1b32dc
commit 8d0fe52dd8
48 changed files with 78 additions and 64 deletions

View File

@@ -79,7 +79,9 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
var png = new Png(pngData, SpriteFrameType.Indexed8, frameSize.Width, frameSize.Height, palColors);
png.Save($"{prefix}-{(count++):D4}.png");
#pragma warning disable SA1003
png.Save($"{prefix}-{count++:D4}.png");
#pragma warning restore SA1003
}
Console.WriteLine("Saved {0}-[0..{1}].png", prefix, count - 1);

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (frameAmountField != null)
{
var frameAmount = FieldLoader.GetValue<int>("FrameAmount", frameAmountField);
if (frameAmount > (png.Width / frameSize.Width) * (png.Height / frameSize.Height))
if (frameAmount > png.Width / frameSize.Width * (png.Height / frameSize.Height))
throw new InvalidDataException(".png file is too small for given FrameSize and FrameAmount.");
}
}