Use Array.Empty and fix a few multiple enumerations (#14194)

This commit is contained in:
Stepan Goremykin
2023-04-02 08:57:30 -07:00
committed by GitHub
parent 37f68715f9
commit 97c4a976c7
15 changed files with 37 additions and 36 deletions

View File

@@ -131,7 +131,7 @@ namespace Jackett.Updater
if (!(updateLocation.EndsWith("\\") || updateLocation.EndsWith("/")))
updateLocation += Path.DirectorySeparatorChar;
var pids = new int[] { };
var pids = Array.Empty<int>();
if (options.KillPids != null)
{
var pidsStr = options.KillPids.Split(',').Where(pid => !string.IsNullOrWhiteSpace(pid)).ToArray();