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

@@ -42,7 +42,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 = false,
Quotes = Quotes,
@@ -210,7 +210,7 @@ namespace SabreTools.DatFiles.Formats
{
// Prepare all internal variables
bool containsItems = false;
Machine machine = new Machine()
Machine machine = new()
{
MachineType = (resource ? MachineType.Bios : MachineType.NULL),
};
@@ -402,7 +402,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
{
@@ -455,7 +455,7 @@ namespace SabreTools.DatFiles.Formats
return false;
}
ClrMameProWriter cmpw = new ClrMameProWriter(fs, new UTF8Encoding(false))
ClrMameProWriter cmpw = new(fs, new UTF8Encoding(false))
{
Quotes = Quotes
};