Perform mass cleanup

This is cleanup based on both new .NET functionality (in 6 and 7) as well as a ton of simplifications and things that were missed that were caught due to the cleanup.
This commit is contained in:
Matt Nadareski
2023-04-19 16:39:58 -04:00
parent fd5fd79b95
commit 728b5d6b27
95 changed files with 1353 additions and 1572 deletions

View File

@@ -32,7 +32,7 @@ namespace SabreTools.DatFiles.Formats
{
// Open a file reader
Encoding enc = filename.GetEncoding();
ClrMameProReader cmpr = new ClrMameProReader(System.IO.File.OpenRead(filename), enc)
ClrMameProReader cmpr = new(System.IO.File.OpenRead(filename), enc)
{
DosCenter = true
};
@@ -143,7 +143,7 @@ namespace SabreTools.DatFiles.Formats
{
// Prepare all internal variables
bool containsItems = false;
Machine machine = new Machine()
Machine machine = new()
{
MachineType = MachineType.NULL,
};
@@ -236,7 +236,7 @@ namespace SabreTools.DatFiles.Formats
// If no items were found for this machine, add a Blank placeholder
if (!containsItems)
{
Blank blank = new Blank()
Blank blank = new()
{
Source = new Source
{
@@ -280,7 +280,7 @@ namespace SabreTools.DatFiles.Formats
return false;
}
ClrMameProWriter cmpw = new ClrMameProWriter(fs, new UTF8Encoding(false))
ClrMameProWriter cmpw = new(fs, new UTF8Encoding(false))
{
Quotes = false
};