Remove constructor base() redundancies
This commit is contained in:
@@ -107,7 +107,6 @@ namespace OpenRA.Editor
|
||||
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
|
||||
|
||||
public Surface()
|
||||
: base()
|
||||
{
|
||||
BackColor = Color.Black;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.FileFormats.Primitives
|
||||
public event Action<object, object> OnSet = (o, n) => { };
|
||||
public event Action OnRefresh = () => { };
|
||||
|
||||
public ObservableCollection() : base() { }
|
||||
public ObservableCollection() { }
|
||||
public ObservableCollection(IList<T> list) : base(list) { }
|
||||
|
||||
protected override void SetItem(int index, T item)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Widgets
|
||||
WidgetUtils.DrawPanel(Background, RenderBounds);
|
||||
}
|
||||
|
||||
public BackgroundWidget() : base() { }
|
||||
public BackgroundWidget() { }
|
||||
|
||||
bool moving;
|
||||
int2? prevMouseLocation;
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace OpenRA.Widgets
|
||||
public Action<KeyInput> OnKeyPress = _ => {};
|
||||
|
||||
public ButtonWidget()
|
||||
: base()
|
||||
{
|
||||
GetText = () => { return Text; };
|
||||
OnMouseUp = _ => OnClick();
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Widgets
|
||||
internal List<ChatLine> recentLines = new List<ChatLine>();
|
||||
|
||||
public ChatDisplayWidget()
|
||||
: base() { }
|
||||
{ }
|
||||
|
||||
public override Rectangle EventBounds { get { return Rectangle.Empty; } }
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace OpenRA.Widgets
|
||||
public bool HasPressedState = ChromeMetrics.Get<bool>("CheckboxPressedState");
|
||||
|
||||
public CheckboxWidget()
|
||||
: base()
|
||||
{
|
||||
GetCheckType = () => CheckType;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Widgets
|
||||
OrderManager orderManager;
|
||||
int clientIndex;
|
||||
|
||||
public ClientTooltipRegionWidget() : base()
|
||||
public ClientTooltipRegionWidget()
|
||||
{
|
||||
tooltipContainer = Lazy.New(() => Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace OpenRA.Widgets
|
||||
public Func<Color> GetColor;
|
||||
|
||||
public ColorBlockWidget()
|
||||
: base()
|
||||
{
|
||||
GetColor = () => Color.White;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Widgets
|
||||
Widget panel;
|
||||
MaskWidget fullscreenMask;
|
||||
|
||||
public DropDownButtonWidget() : base() { }
|
||||
public DropDownButtonWidget() { }
|
||||
|
||||
protected DropDownButtonWidget(DropDownButtonWidget widget) : base(widget) { }
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace OpenRA.Widgets
|
||||
public class MaskWidget : Widget
|
||||
{
|
||||
public event Action<MouseInput> OnMouseDown = _ => {};
|
||||
public MaskWidget() : base() { }
|
||||
public MaskWidget() { }
|
||||
public MaskWidget(MaskWidget other)
|
||||
: base(other)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Widgets
|
||||
public Color DisabledColor = Color.Gray;
|
||||
public string Font = "Regular";
|
||||
|
||||
public HotkeyEntryWidget() : base() {}
|
||||
public HotkeyEntryWidget() {}
|
||||
protected HotkeyEntryWidget(HotkeyEntryWidget widget)
|
||||
: base(widget)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace OpenRA.Widgets
|
||||
public Func<string> GetImageCollection;
|
||||
|
||||
public ImageWidget()
|
||||
: base()
|
||||
{
|
||||
GetImageName = () => ImageName;
|
||||
GetImageCollection = () => ImageCollection;
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace OpenRA.Widgets
|
||||
public Func<Color> GetContrastColor;
|
||||
|
||||
public LabelWidget()
|
||||
: base()
|
||||
{
|
||||
GetText = () => Text;
|
||||
GetColor = () => Color;
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace OpenRA.Widgets
|
||||
public string AxisFont;
|
||||
|
||||
public LineGraphWidget()
|
||||
: base()
|
||||
{
|
||||
GetValueFormat = () => ValueFormat;
|
||||
GetXAxisValueFormat = () => XAxisValueFormat;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Widgets
|
||||
Lazy<TooltipContainerWidget> tooltipContainer;
|
||||
public int TooltipSpawnIndex = -1;
|
||||
|
||||
public MapPreviewWidget() : base()
|
||||
public MapPreviewWidget()
|
||||
{
|
||||
tooltipContainer = Lazy.New(() => Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
public class PasswordFieldWidget : TextFieldWidget
|
||||
{
|
||||
public PasswordFieldWidget() : base() { }
|
||||
public PasswordFieldWidget() { }
|
||||
protected PasswordFieldWidget(PasswordFieldWidget widget) : base(widget) { }
|
||||
|
||||
protected override string GetApparentText() { return new string('*', Text.Length); }
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
public class PerfGraphWidget : Widget
|
||||
{
|
||||
public PerfGraphWidget() : base() { }
|
||||
public PerfGraphWidget() { }
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Widgets
|
||||
float offset = 0f;
|
||||
float tickStep = 0.04f;
|
||||
|
||||
public ProgressBarWidget() : base() {}
|
||||
public ProgressBarWidget() {}
|
||||
protected ProgressBarWidget(ProgressBarWidget widget)
|
||||
: base(widget)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace OpenRA.Widgets
|
||||
public string BaseName = "scrollitem";
|
||||
|
||||
public ScrollItemWidget()
|
||||
: base()
|
||||
{
|
||||
IsVisible = () => false;
|
||||
VisualHeight = 0;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Widgets
|
||||
protected Rectangle scrollbarRect;
|
||||
protected Rectangle thumbRect;
|
||||
|
||||
public ScrollPanelWidget() : base() { Layout = new ListLayout(this); }
|
||||
public ScrollPanelWidget() { Layout = new ListLayout(this); }
|
||||
|
||||
public override void RemoveChildren()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace OpenRA.Widgets
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ShpImageWidget(WorldRenderer worldRenderer)
|
||||
: base()
|
||||
{
|
||||
GetImage = () => { return Image; };
|
||||
GetFrame = () => { return Frame; };
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace OpenRA.Widgets
|
||||
protected bool isMoving = false;
|
||||
|
||||
public SliderWidget()
|
||||
: base()
|
||||
{
|
||||
GetValue = () => Value;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Widgets
|
||||
public Color DisabledColor = Color.Gray;
|
||||
public string Font = "Regular";
|
||||
|
||||
public TextFieldWidget() : base() {}
|
||||
public TextFieldWidget() {}
|
||||
protected TextFieldWidget(TextFieldWidget widget)
|
||||
: base(widget)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace OpenRA.Widgets
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ViewportControllerWidget(World world, WorldRenderer worldRenderer)
|
||||
: base()
|
||||
{
|
||||
this.world = world;
|
||||
this.worldRenderer = worldRenderer;
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
public class ContainerWidget : Widget
|
||||
{
|
||||
public ContainerWidget() : base() { IgnoreMouseOver = true; }
|
||||
public ContainerWidget() { IgnoreMouseOver = true; }
|
||||
public ContainerWidget(ContainerWidget other)
|
||||
: base(other) { IgnoreMouseOver = true; }
|
||||
|
||||
@@ -458,7 +458,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
public class WidgetArgs : Dictionary<string, object>
|
||||
{
|
||||
public WidgetArgs() : base() { }
|
||||
public WidgetArgs() { }
|
||||
public WidgetArgs(Dictionary<string, object> args) : base(args) { }
|
||||
public void Add(string key, Action val) { base.Add(key, val); }
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
{
|
||||
public readonly string ProductionGroup;
|
||||
|
||||
public ProductionTypeButtonWidget() : base() { }
|
||||
public ProductionTypeButtonWidget() { }
|
||||
protected ProductionTypeButtonWidget(ProductionTypeButtonWidget other)
|
||||
: base(other)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace OpenRA.Mods.RA.AI
|
||||
{
|
||||
class RushFuzzy : AttackOrFleeFuzzy
|
||||
{
|
||||
public RushFuzzy() : base() { }
|
||||
public RushFuzzy() { }
|
||||
|
||||
protected override void AddingRulesForNormalOwnHealth()
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
Thread workerThread;
|
||||
bool workerAlive;
|
||||
|
||||
public ColorMixerWidget() : base() {}
|
||||
public ColorMixerWidget() {}
|
||||
public ColorMixerWidget(ColorMixerWidget other)
|
||||
: base(other)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ColorPreviewManagerWidget(WorldRenderer worldRenderer)
|
||||
: base()
|
||||
{
|
||||
this.worldRenderer = worldRenderer;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
Bitmap hueBitmap;
|
||||
Sprite hueSprite;
|
||||
|
||||
public HueSliderWidget() : base() {}
|
||||
public HueSliderWidget() {}
|
||||
public HueSliderWidget(HueSliderWidget other) : base(other) {}
|
||||
|
||||
public override void Initialize(WidgetArgs args)
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ObserverProductionIconsWidget(World world, WorldRenderer worldRenderer)
|
||||
: base()
|
||||
{
|
||||
this.world = world;
|
||||
this.worldRenderer = worldRenderer;
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public ObserverSupportPowerIconsWidget(World world, WorldRenderer worldRenderer)
|
||||
: base()
|
||||
{
|
||||
|
||||
this.world = world;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
int2 offset;
|
||||
int frame;
|
||||
|
||||
public SlidingContainerWidget() : base() { }
|
||||
public SlidingContainerWidget() { }
|
||||
public override void Initialize(WidgetArgs args)
|
||||
{
|
||||
base.Initialize(args);
|
||||
|
||||
Reference in New Issue
Block a user