Fix some whitespace formatting issues: stray tabs or spaces.
Wrap some long lines on affected code.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace OpenRA.Traits
|
||||
get => depthBuffer;
|
||||
set
|
||||
{
|
||||
depthBuffer = value;
|
||||
depthBufferDirty = true;
|
||||
depthBuffer = value;
|
||||
depthBufferDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user