Fix some whitespace formatting issues: stray tabs or spaces.

Wrap some long lines on affected code.
This commit is contained in:
RoosterDragon
2023-03-02 16:41:55 +00:00
committed by Gustas
parent edaf11cb89
commit 52fd564eac
22 changed files with 50 additions and 38 deletions

View File

@@ -159,7 +159,7 @@ namespace OpenRA
static object ParseColor(string fieldName, Type fieldType, string value, MemberInfo field)
{
if (value != null && Color.TryParse(value, out var color))
return color;
return color;
return InvalidValueAction(value, fieldType, fieldName);
}

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Graphics
public Sprite Add(Png src, float scale = 1f)
{
var rect = Allocate(new Size(src.Width, src.Height), scale);
var rect = Allocate(new Size(src.Width, src.Height), scale);
Util.FastCopyIntoSprite(rect, src);
current.CommitBufferedData();
return rect;

View File

@@ -29,7 +29,10 @@ namespace OpenRA
public readonly WVec[][] Polygons;
public readonly WRot Orientation;
public CellRamp(MapGridType type, WRot orientation, RampCornerHeight tl = RampCornerHeight.Low, RampCornerHeight tr = RampCornerHeight.Low, RampCornerHeight br = RampCornerHeight.Low, RampCornerHeight bl = RampCornerHeight.Low, RampSplit split = RampSplit.Flat)
public CellRamp(MapGridType type, WRot orientation,
RampCornerHeight tl = RampCornerHeight.Low, RampCornerHeight tr = RampCornerHeight.Low,
RampCornerHeight br = RampCornerHeight.Low, RampCornerHeight bl = RampCornerHeight.Low,
RampSplit split = RampSplit.Flat)
{
Orientation = orientation;
if (type == MapGridType.RectangularIsometric)

View File

@@ -77,14 +77,14 @@ namespace OpenRA.Support
case '9':
return CharClass.Digit;
// Fast-track normal whitespace
// Fast-track normal whitespace
case ' ':
case '\t':
case '\n':
case '\r':
return CharClass.Whitespace;
// Should other whitespace be tested?
// Should other whitespace be tested?
default:
return char.IsWhiteSpace(c) ? CharClass.Whitespace : CharClass.Id;
}

View File

@@ -31,8 +31,8 @@ namespace OpenRA.Traits
get => depthBuffer;
set
{
depthBuffer = value;
depthBufferDirty = true;
depthBuffer = value;
depthBufferDirty = true;
}
}