Simplify 'default' expression (IDE0034)

This commit is contained in:
Gustas
2022-10-11 17:28:58 +03:00
committed by Matthias Mailänder
parent 02d9ba020d
commit 858d782af1
70 changed files with 90 additions and 88 deletions

View File

@@ -836,10 +836,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
public string Faction;
public bool IsEmpty =>
Type == default(GameType)
&& Date == default(DateType)
&& Duration == default(DurationType)
&& Outcome == default(WinState)
Type == default
&& Date == default
&& Duration == default
&& Outcome == default
&& string.IsNullOrEmpty(PlayerName)
&& string.IsNullOrEmpty(MapName)
&& string.IsNullOrEmpty(Faction);

View File

@@ -443,7 +443,7 @@ namespace OpenRA.Mods.Common.Widgets
public void RefreshIcons()
{
icons = new Dictionary<Rectangle, ProductionIcon>();
var producer = CurrentQueue != null ? CurrentQueue.MostLikelyProducer() : default(TraitPair<Production>);
var producer = CurrentQueue != null ? CurrentQueue.MostLikelyProducer() : default;
if (CurrentQueue == null || producer.Trait == null)
{
if (DisplayedIconCount != 0)