Move ctor initializers to their own line.
This commit is contained in:
@@ -34,7 +34,8 @@ namespace OpenRA
|
||||
public byte Layer { get { return (byte)Bits; } }
|
||||
|
||||
public CPos(int bits) { Bits = bits; }
|
||||
public CPos(int x, int y) : this(x, y, 0) { }
|
||||
public CPos(int x, int y)
|
||||
: this(x, y, 0) { }
|
||||
public CPos(int x, int y, byte layer)
|
||||
{
|
||||
Bits = (x & 0xFFF) << 20 | (y & 0xFFF) << 8 | layer;
|
||||
|
||||
@@ -40,7 +40,8 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public MissingFieldsException(string[] missing, string header = null, string headerSingle = null) : base(null)
|
||||
public MissingFieldsException(string[] missing, string header = null, string headerSingle = null)
|
||||
: base(null)
|
||||
{
|
||||
Header = missing.Length > 1 ? header : headerSingle ?? header;
|
||||
Missing = missing;
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace OpenRA
|
||||
|
||||
Lazy<TypeDictionary> initDict;
|
||||
|
||||
public ActorReference(string type) : this(type, new Dictionary<string, MiniYaml>()) { }
|
||||
public ActorReference(string type)
|
||||
: this(type, new Dictionary<string, MiniYaml>()) { }
|
||||
|
||||
public ActorReference(string type, Dictionary<string, MiniYaml> inits)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace OpenRA
|
||||
{
|
||||
public readonly Dictionary<string, PlayerReference> Players;
|
||||
|
||||
public MapPlayers() : this(new List<MiniYamlNode>()) { }
|
||||
public MapPlayers()
|
||||
: this(new List<MiniYamlNode>()) { }
|
||||
|
||||
public MapPlayers(IEnumerable<MiniYamlNode> playerDefinitions)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,8 @@ namespace OpenRA
|
||||
return ret;
|
||||
}
|
||||
|
||||
public MiniYaml(string value) : this(value, null) { }
|
||||
public MiniYaml(string value)
|
||||
: this(value, null) { }
|
||||
|
||||
public MiniYaml(string value, List<MiniYamlNode> nodes)
|
||||
{
|
||||
@@ -474,6 +475,7 @@ namespace OpenRA
|
||||
[Serializable]
|
||||
public class YamlException : Exception
|
||||
{
|
||||
public YamlException(string s) : base(s) { }
|
||||
public YamlException(string s)
|
||||
: base(s) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,9 @@ namespace OpenRA.Primitives
|
||||
{
|
||||
readonly BitSetIndex bits;
|
||||
|
||||
public BitSet(params string[] values) : this(BitSetAllocator<T>.GetBits(values)) { }
|
||||
public BitSet(params string[] values)
|
||||
: this(BitSetAllocator<T>.GetBits(values)) { }
|
||||
|
||||
BitSet(BitSetIndex bits) { this.bits = bits; }
|
||||
|
||||
public static BitSet<T> FromStringsNoAlloc(string[] values)
|
||||
|
||||
@@ -29,7 +29,8 @@ namespace OpenRA.Primitives
|
||||
public event Action<IObservableCollection> OnRefresh = x => { };
|
||||
|
||||
public ObservableCollection() { }
|
||||
public ObservableCollection(IList<T> list) : base(list) { }
|
||||
public ObservableCollection(IList<T> list)
|
||||
: base(list) { }
|
||||
|
||||
protected override void SetItem(int index, T item)
|
||||
{
|
||||
|
||||
@@ -28,9 +28,8 @@ namespace OpenRA.Primitives
|
||||
readonly IComparer<T> comparer;
|
||||
int level, index;
|
||||
|
||||
public PriorityQueue() : this(Comparer<T>.Default)
|
||||
{
|
||||
}
|
||||
public PriorityQueue()
|
||||
: this(Comparer<T>.Default) { }
|
||||
|
||||
public PriorityQueue(IComparer<T> comparer)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace OpenRA.Support
|
||||
public int Last;
|
||||
public int TotalCount = 0;
|
||||
|
||||
public MersenneTwister() : this(Environment.TickCount) { }
|
||||
public MersenneTwister()
|
||||
: this(Environment.TickCount) { }
|
||||
|
||||
public MersenneTwister(int seed)
|
||||
{
|
||||
|
||||
@@ -561,7 +561,8 @@ namespace OpenRA.Support
|
||||
|
||||
public override string Symbol { get { return Name; } }
|
||||
|
||||
public VariableToken(int index, string symbol) : base(TokenType.Variable, index) { Name = symbol; }
|
||||
public VariableToken(int index, string symbol)
|
||||
: base(TokenType.Variable, index) { Name = symbol; }
|
||||
}
|
||||
|
||||
class NumberToken : Token
|
||||
@@ -957,7 +958,8 @@ namespace OpenRA.Support
|
||||
{
|
||||
readonly Func<IReadOnlyDictionary<string, int>, bool> asFunction;
|
||||
|
||||
public BooleanExpression(string expression) : base(expression)
|
||||
public BooleanExpression(string expression)
|
||||
: base(expression)
|
||||
{
|
||||
asFunction = Compile<bool>();
|
||||
}
|
||||
@@ -972,7 +974,8 @@ namespace OpenRA.Support
|
||||
{
|
||||
readonly Func<IReadOnlyDictionary<string, int>, int> asFunction;
|
||||
|
||||
public IntegerExpression(string expression) : base(expression)
|
||||
public IntegerExpression(string expression)
|
||||
: base(expression)
|
||||
{
|
||||
asFunction = Compile<int>();
|
||||
}
|
||||
|
||||
@@ -587,7 +587,8 @@ namespace OpenRA.Widgets
|
||||
public class WidgetArgs : Dictionary<string, object>
|
||||
{
|
||||
public WidgetArgs() { }
|
||||
public WidgetArgs(Dictionary<string, object> args) : base(args) { }
|
||||
public WidgetArgs(Dictionary<string, object> args)
|
||||
: base(args) { }
|
||||
public void Add(string key, Action val) { base.Add(key, val); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user