mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
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:
@@ -162,7 +162,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
reader.MoveToContent();
|
||||
|
||||
// Create the Rom to store the info
|
||||
Rom rom = new Rom
|
||||
Rom rom = new()
|
||||
{
|
||||
Name = reader.GetAttribute("name"),
|
||||
ArchiveDotOrgSource = reader.GetAttribute("source"),
|
||||
@@ -187,7 +187,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
rom.Machine.Name = splitpath[0];
|
||||
rom.Machine.Description = splitpath[0];
|
||||
|
||||
rom.Name = rom.Name.Substring(splitpath[0].Length + 1);
|
||||
rom.Name = rom.Name[(splitpath[0].Length + 1)..];
|
||||
}
|
||||
|
||||
// TODO: Handle SuperDAT
|
||||
@@ -287,7 +287,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
return false;
|
||||
}
|
||||
|
||||
XmlTextWriter xtw = new XmlTextWriter(fs, new UTF8Encoding(false))
|
||||
XmlTextWriter xtw = new(fs, new UTF8Encoding(false))
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
IndentChar = ' ',
|
||||
|
||||
Reference in New Issue
Block a user