misc: chore: Use collection expressions in Avalonia project

This commit is contained in:
Evan Husted 2025-01-26 15:47:11 -06:00
parent 46a5cafaa8
commit ae90db2040
28 changed files with 114 additions and 112 deletions

View file

@ -146,7 +146,7 @@ namespace Ryujinx.Ava.UI.Controls
DirectoryInfo mainDir = new(Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "cpu", "0"));
DirectoryInfo backupDir = new(Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "cpu", "1"));
List<FileInfo> cacheFiles = new();
List<FileInfo> cacheFiles = [];
if (mainDir.Exists)
{
@ -189,8 +189,8 @@ namespace Ryujinx.Ava.UI.Controls
{
DirectoryInfo shaderCacheDir = new(Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "shader"));
List<DirectoryInfo> oldCacheDirectories = new();
List<FileInfo> newCacheFiles = new();
List<DirectoryInfo> oldCacheDirectories = [];
List<FileInfo> newCacheFiles = [];
if (shaderCacheDir.Exists)
{

View file

@ -114,7 +114,7 @@ namespace Ryujinx.Ava.UI.Controls
Span<SaveDataInfo> saveDataInfo = stackalloc SaveDataInfo[10];
HashSet<UserId> lostAccounts = new();
HashSet<UserId> lostAccounts = [];
while (true)
{