Fix IDE0055

This rule no longer appears to be buggy, so enforce it. Some of the automated fixes are adjusted in order to improve the result. #pragma directives have no option to control indentation, so remove them where possible.
This commit is contained in:
RoosterDragon
2023-11-09 19:56:52 +00:00
committed by Pavel Penev
parent 60cbf79c9b
commit 360f24f609
58 changed files with 719 additions and 714 deletions

View File

@@ -172,26 +172,26 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
{
case Format.XORPrev:
case Format.XORLCW:
{
if (h.RefImage.Data == null)
{
if (h.RefImage.Data == null)
{
++recurseDepth;
Decompress(h.RefImage);
--recurseDepth;
}
h.Data = CopyImageData(h.RefImage.Data);
XORDeltaCompression.DecodeInto(shpBytes, h.Data, (int)(h.FileOffset - shpBytesFileOffset));
break;
++recurseDepth;
Decompress(h.RefImage);
--recurseDepth;
}
h.Data = CopyImageData(h.RefImage.Data);
XORDeltaCompression.DecodeInto(shpBytes, h.Data, (int)(h.FileOffset - shpBytesFileOffset));
break;
}
case Format.LCW:
{
var imageBytes = new byte[Size.Width * Size.Height];
LCWCompression.DecodeInto(shpBytes, imageBytes, (int)(h.FileOffset - shpBytesFileOffset));
h.Data = imageBytes;
break;
}
{
var imageBytes = new byte[Size.Width * Size.Height];
LCWCompression.DecodeInto(shpBytes, imageBytes, (int)(h.FileOffset - shpBytesFileOffset));
h.Data = imageBytes;
break;
}
default:
throw new InvalidDataException();