Switch other struct types to default(T).

This commit is contained in:
Paul Chote
2019-06-07 21:28:38 +01:00
committed by abcdefg30
parent dba1301b61
commit ebd36891dc
13 changed files with 15 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits
public class AppearsOnMapPreviewInfo : TraitInfo<AppearsOnMapPreview>, IMapPreviewSignatureInfo, Requires<IOccupySpaceInfo>
{
[Desc("Use this color to render the actor, instead of owner player color.")]
public readonly Color Color = new Color();
public readonly Color Color = default(Color);
[Desc("Use this terrain color to render the actor, instead of owner player color.",
"Overrides `Color` if both set.")]
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits
{
color = tileSet[tileSet.GetTerrainIndex(Terrain)].Color;
}
else if (Color != new Color())
else if (Color != default(Color))
{
color = Color;
}