Remove constructor base() redundancies

This commit is contained in:
ScottNZ
2013-11-12 17:31:55 +13:00
parent 7c5f3cc0f1
commit 86a3e14f2d
32 changed files with 20 additions and 34 deletions

View File

@@ -107,7 +107,6 @@ namespace OpenRA.Editor
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
public Surface()
: base()
{
BackColor = Color.Black;

View File

@@ -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)

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Widgets
WidgetUtils.DrawPanel(Background, RenderBounds);
}
public BackgroundWidget() : base() { }
public BackgroundWidget() { }
bool moving;
int2? prevMouseLocation;

View File

@@ -48,7 +48,6 @@ namespace OpenRA.Widgets
public Action<KeyInput> OnKeyPress = _ => {};
public ButtonWidget()
: base()
{
GetText = () => { return Text; };
OnMouseUp = _ => OnClick();

View File

@@ -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; } }

View File

@@ -25,7 +25,6 @@ namespace OpenRA.Widgets
public bool HasPressedState = ChromeMetrics.Get<bool>("CheckboxPressedState");
public CheckboxWidget()
: base()
{
GetCheckType = () => CheckType;
}

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Widgets
OrderManager orderManager;
int clientIndex;
public ClientTooltipRegionWidget() : base()
public ClientTooltipRegionWidget()
{
tooltipContainer = Lazy.New(() => Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
}

View File

@@ -18,7 +18,6 @@ namespace OpenRA.Widgets
public Func<Color> GetColor;
public ColorBlockWidget()
: base()
{
GetColor = () => Color.White;
}

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -21,7 +21,6 @@ namespace OpenRA.Widgets
public Func<string> GetImageCollection;
public ImageWidget()
: base()
{
GetImageName = () => ImageName;
GetImageCollection = () => ImageCollection;

View File

@@ -33,7 +33,6 @@ namespace OpenRA.Widgets
public Func<Color> GetContrastColor;
public LabelWidget()
: base()
{
GetText = () => Text;
GetColor = () => Color;

View File

@@ -41,7 +41,6 @@ namespace OpenRA.Widgets
public string AxisFont;
public LineGraphWidget()
: base()
{
GetValueFormat = () => ValueFormat;
GetXAxisValueFormat = () => XAxisValueFormat;

View File

@@ -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));
}

View File

@@ -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); }

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Widgets
{
public class PerfGraphWidget : Widget
{
public PerfGraphWidget() : base() { }
public PerfGraphWidget() { }
public override void Draw()
{

View File

@@ -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)
{

View File

@@ -18,7 +18,6 @@ namespace OpenRA.Widgets
public string BaseName = "scrollitem";
public ScrollItemWidget()
: base()
{
IsVisible = () => false;
VisualHeight = 0;

View File

@@ -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()
{

View File

@@ -28,7 +28,6 @@ namespace OpenRA.Widgets
[ObjectCreator.UseCtor]
public ShpImageWidget(WorldRenderer worldRenderer)
: base()
{
GetImage = () => { return Image; };
GetFrame = () => { return Frame; };

View File

@@ -29,7 +29,6 @@ namespace OpenRA.Widgets
protected bool isMoving = false;
public SliderWidget()
: base()
{
GetValue = () => Value;
}

View File

@@ -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)
{

View File

@@ -61,7 +61,6 @@ namespace OpenRA.Widgets
[ObjectCreator.UseCtor]
public ViewportControllerWidget(World world, WorldRenderer worldRenderer)
: base()
{
this.world = world;
this.worldRenderer = worldRenderer;

View File

@@ -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); }
}

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc.Widgets
{
public readonly string ProductionGroup;
public ProductionTypeButtonWidget() : base() { }
public ProductionTypeButtonWidget() { }
protected ProductionTypeButtonWidget(ProductionTypeButtonWidget other)
: base(other)
{

View File

@@ -12,7 +12,7 @@ namespace OpenRA.Mods.RA.AI
{
class RushFuzzy : AttackOrFleeFuzzy
{
public RushFuzzy() : base() { }
public RushFuzzy() { }
protected override void AddingRulesForNormalOwnHealth()
{

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA.Widgets
Thread workerThread;
bool workerAlive;
public ColorMixerWidget() : base() {}
public ColorMixerWidget() {}
public ColorMixerWidget(ColorMixerWidget other)
: base(other)
{

View File

@@ -31,7 +31,6 @@ namespace OpenRA.Mods.RA.Widgets
[ObjectCreator.UseCtor]
public ColorPreviewManagerWidget(WorldRenderer worldRenderer)
: base()
{
this.worldRenderer = worldRenderer;
}

View File

@@ -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)

View File

@@ -27,7 +27,6 @@ namespace OpenRA.Mods.RA.Widgets
[ObjectCreator.UseCtor]
public ObserverProductionIconsWidget(World world, WorldRenderer worldRenderer)
: base()
{
this.world = world;
this.worldRenderer = worldRenderer;

View File

@@ -27,7 +27,6 @@ namespace OpenRA.Mods.RA.Widgets
[ObjectCreator.UseCtor]
public ObserverSupportPowerIconsWidget(World world, WorldRenderer worldRenderer)
: base()
{
this.world = world;

View File

@@ -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);