mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
CA1825
This commit is contained in:
parent
02b23756ff
commit
3362d1cba7
2 changed files with 6 additions and 18 deletions
|
|
@ -83,13 +83,9 @@ namespace Flow.Launcher.Plugin.Program
|
|||
Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|Preload programs cost", () =>
|
||||
{
|
||||
_win32Storage = new BinaryStorage<Win32[]>("Win32");
|
||||
_win32s = _win32Storage.TryLoad(new Win32[]
|
||||
{
|
||||
});
|
||||
_win32s = _win32Storage.TryLoad(Array.Empty<Win32>());
|
||||
_uwpStorage = new BinaryStorage<UWP.Application[]>("UWP");
|
||||
_uwps = _uwpStorage.TryLoad(new UWP.Application[]
|
||||
{
|
||||
});
|
||||
_uwps = _uwpStorage.TryLoad(Array.Empty<UWP.Application>());
|
||||
});
|
||||
Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Length}>");
|
||||
Log.Info($"|Flow.Launcher.Plugin.Program.Main|Number of preload uwps <{_uwps.Length}>");
|
||||
|
|
@ -124,9 +120,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
{
|
||||
var windows10 = new Version(10, 0);
|
||||
var support = Environment.OSVersion.Version.Major >= windows10.Major;
|
||||
var applications = support ? UWP.All() : new UWP.Application[]
|
||||
{
|
||||
};
|
||||
var applications = support ? UWP.All() : Array.Empty<UWP.Application>();
|
||||
_uwps = applications;
|
||||
ResetCache();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,9 +109,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
ProgramLogger.LogException($"|UWP|XmlNamespaces|{path}" +
|
||||
$"|Error occured while trying to get the XML from {path}", new ArgumentNullException());
|
||||
|
||||
return new string[]
|
||||
{
|
||||
};
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -184,9 +182,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
}
|
||||
else
|
||||
{
|
||||
return new Application[]
|
||||
{
|
||||
};
|
||||
return Array.Empty<Application>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -232,9 +228,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
}
|
||||
else
|
||||
{
|
||||
return new Package[]
|
||||
{
|
||||
};
|
||||
return Array.Empty<Package>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue