You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-11-06 09:19:38 +02:00
Don't compare strings to Empty using Equals
Comparing strings using the String.Length property or the String.IsNullOrEmpty method is faster than using Equals. This is because Equals executes significantly more MSIL instructions than either IsNullOrEmpty or the number of instructions executed to retrieve the Length property value and compare it to zero.
This commit is contained in:
@@ -191,7 +191,6 @@ dotnet_diagnostic.CA1814.severity = suggestion
|
||||
dotnet_diagnostic.CA1815.severity = suggestion
|
||||
dotnet_diagnostic.CA1816.severity = suggestion
|
||||
dotnet_diagnostic.CA1819.severity = suggestion
|
||||
dotnet_diagnostic.CA1820.severity = suggestion
|
||||
dotnet_diagnostic.CA1822.severity = suggestion
|
||||
dotnet_diagnostic.CA1823.severity = suggestion
|
||||
dotnet_diagnostic.CA1824.severity = suggestion
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc
|
||||
xmlResult += "https://www.thetvdb.com/?tab=series&id=" + series.TvdbId;
|
||||
}
|
||||
|
||||
return xmlResult == string.Empty ? null : new MetadataFileResult("tvshow.nfo", xmlResult);
|
||||
return xmlResult.IsNullOrWhiteSpace() ? null : new MetadataFileResult("tvshow.nfo", xmlResult);
|
||||
}
|
||||
|
||||
public override MetadataFileResult EpisodeMetadata(Series series, EpisodeFile episodeFile)
|
||||
|
||||
Reference in New Issue
Block a user