Switch other struct types to default(T).
This commit is contained in:
@@ -160,7 +160,7 @@ namespace OpenRA
|
||||
}
|
||||
|
||||
innerState = LinkState.Uninitialized;
|
||||
parameters = new RSAParameters();
|
||||
parameters = default(RSAParameters);
|
||||
innerFingerprint = null;
|
||||
innerData = null;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace OpenRA
|
||||
foreach (var kv in tree)
|
||||
{
|
||||
var inherited = new Dictionary<string, MiniYamlNode.SourceLocation>();
|
||||
inherited.Add(kv.Key, new MiniYamlNode.SourceLocation());
|
||||
inherited.Add(kv.Key, default(MiniYamlNode.SourceLocation));
|
||||
|
||||
var children = ResolveInherits(kv.Key, kv.Value, tree, inherited);
|
||||
resolved.Add(kv.Key, new MiniYaml(kv.Value.Value, children));
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace OpenRA.Primitives
|
||||
|
||||
public static bool TryParse(string value, out Color color)
|
||||
{
|
||||
color = new Color();
|
||||
color = default(Color);
|
||||
value = value.Trim();
|
||||
if (value.Length != 6 && value.Length != 8)
|
||||
return false;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace OpenRA
|
||||
|
||||
if (string.IsNullOrEmpty(baseFilename))
|
||||
{
|
||||
Channels.Add(channelName, new ChannelInfo());
|
||||
Channels.Add(channelName, default(ChannelInfo));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Traits
|
||||
public struct Target
|
||||
{
|
||||
public static readonly Target[] None = { };
|
||||
public static readonly Target Invalid = new Target();
|
||||
public static readonly Target Invalid = default(Target);
|
||||
|
||||
readonly TargetType type;
|
||||
readonly Actor actor;
|
||||
|
||||
Reference in New Issue
Block a user