misc: chore: Fix object creation in Common project

This commit is contained in:
Evan Husted
2025-01-26 15:21:47 -06:00
parent ae92fbf539
commit 7f5a356c3d
5 changed files with 12 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ namespace Ryujinx.Common.Utilities
public static void CopyDirectory(string sourceDir, string destinationDir, bool recursive)
{
// Get information about the source directory
DirectoryInfo dir = new DirectoryInfo(sourceDir);
DirectoryInfo dir = new(sourceDir);
// Check if the source directory exists
if (!dir.Exists)
@@ -49,7 +49,7 @@ namespace Ryujinx.Common.Utilities
public static string SanitizeFileName(string fileName)
{
HashSet<char> reservedChars = new HashSet<char>(Path.GetInvalidFileNameChars());
HashSet<char> reservedChars = new(Path.GetInvalidFileNameChars());
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
}
}