mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 09:59:29 +02:00
misc: chore: Use collection expressions
This commit is contained in:
@@ -88,11 +88,11 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
public ModCache()
|
||||
{
|
||||
RomfsContainers = new List<Mod<FileInfo>>();
|
||||
ExefsContainers = new List<Mod<FileInfo>>();
|
||||
RomfsDirs = new List<Mod<DirectoryInfo>>();
|
||||
ExefsDirs = new List<Mod<DirectoryInfo>>();
|
||||
Cheats = new List<Cheat>();
|
||||
RomfsContainers = [];
|
||||
ExefsContainers = [];
|
||||
RomfsDirs = [];
|
||||
ExefsDirs = [];
|
||||
Cheats = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +107,9 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
public PatchCache()
|
||||
{
|
||||
NsoPatches = new List<Mod<DirectoryInfo>>();
|
||||
NroPatches = new List<Mod<DirectoryInfo>>();
|
||||
KipPatches = new List<Mod<DirectoryInfo>>();
|
||||
NsoPatches = [];
|
||||
NroPatches = [];
|
||||
KipPatches = [];
|
||||
|
||||
Initialized = false;
|
||||
}
|
||||
@@ -373,8 +373,8 @@ namespace Ryujinx.HLE.HOS
|
||||
private static IEnumerable<Cheat> GetCheatsInFile(FileInfo cheatFile)
|
||||
{
|
||||
string cheatName = DefaultCheatName;
|
||||
List<string> instructions = new();
|
||||
List<Cheat> cheats = new();
|
||||
List<string> instructions = [];
|
||||
List<Cheat> cheats = [];
|
||||
|
||||
using StreamReader cheatData = cheatFile.OpenText();
|
||||
while (cheatData.ReadLine() is { } line)
|
||||
@@ -401,7 +401,7 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
// Start a new cheat section.
|
||||
cheatName = line[1..^1];
|
||||
instructions = new List<string>();
|
||||
instructions = [];
|
||||
}
|
||||
else if (line.Length > 0)
|
||||
{
|
||||
@@ -434,7 +434,7 @@ namespace Ryujinx.HLE.HOS
|
||||
{
|
||||
foreach ((ulong applicationId, ModCache cache) in modCaches)
|
||||
{
|
||||
QueryContentsDir(cache, searchDir, applicationId, Array.Empty<ulong>());
|
||||
QueryContentsDir(cache, searchDir, applicationId, []);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user