mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
Fixed: Avoid zero-length array memory allocations
This commit is contained in:
@@ -349,7 +349,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
{
|
||||
if (result.Torrents == null)
|
||||
{
|
||||
return new DelugeTorrent[0];
|
||||
return Array.Empty<DelugeTorrent>();
|
||||
}
|
||||
|
||||
return result.Torrents.Values.ToArray();
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
||||
{
|
||||
if (torrentsRaw == null)
|
||||
{
|
||||
return new HadoukenTorrent[0];
|
||||
return Array.Empty<HadoukenTorrent>();
|
||||
}
|
||||
|
||||
var torrents = new List<HadoukenTorrent>();
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
|
||||
|
||||
public TrackedDownload()
|
||||
{
|
||||
StatusMessages = new TrackedDownloadStatusMessage[] { };
|
||||
StatusMessages = System.Array.Empty<TrackedDownloadStatusMessage>();
|
||||
}
|
||||
|
||||
public void Warn(string message, params object[] args)
|
||||
|
||||
Reference in New Issue
Block a user