Remove unnecessary assignments to default type value

The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance
This commit is contained in:
Qstick
2023-02-18 12:23:08 -06:00
parent b41cb80e33
commit 5bb3ea0806
7 changed files with 15 additions and 16 deletions
@@ -44,7 +44,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
public double? RequestDelay { get; set; }
public List<string> Links { get; set; }
public List<string> Legacylinks { get; set; }
public bool Followredirect { get; set; } = false;
public bool Followredirect { get; set; }
public bool TestLinkTorrent { get; set; } = true;
public List<string> Certificates { get; set; }
public CapabilitiesBlock Caps { get; set; }
@@ -95,7 +95,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
public List<string> Cookies { get; set; }
public string Method { get; set; }
public string Form { get; set; }
public bool Selectors { get; set; } = false;
public bool Selectors { get; set; }
public Dictionary<string, string> Inputs { get; set; }
public Dictionary<string, SelectorBlock> Selectorinputs { get; set; }
public Dictionary<string, SelectorBlock> Getselectorinputs { get; set; }
@@ -114,7 +114,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
public class SelectorBlock
{
public string Selector { get; set; }
public bool Optional { get; set; } = false;
public bool Optional { get; set; }
public string Text { get; set; }
public string Attribute { get; set; }
public string Remove { get; set; }
@@ -157,7 +157,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
public int After { get; set; }
public SelectorBlock Dateheaders { get; set; }
public SelectorBlock Count { get; set; }
public bool Multiple { get; set; } = false;
public bool Multiple { get; set; }
}
public class SearchPathBlock : RequestBlock