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:
@@ -29,7 +29,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
public override void ParseFile(string filename, int indexId, bool keep, bool statsOnly = false, bool throwOnError = false)
|
||||
{
|
||||
// Prepare all intenral variables
|
||||
IniReader ir = new IniReader(filename) { ValidateRows = false };
|
||||
IniReader ir = new(filename) { ValidateRows = false };
|
||||
|
||||
// If we got a null reader, just return
|
||||
if (ir == null)
|
||||
@@ -326,7 +326,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
9 - merge name
|
||||
*/
|
||||
string[] rominfo = line.Split('¬');
|
||||
Rom rom = new Rom
|
||||
Rom rom = new()
|
||||
{
|
||||
Name = rominfo[5],
|
||||
Size = Utilities.CleanLong(rominfo[7]),
|
||||
@@ -385,14 +385,14 @@ namespace SabreTools.DatFiles.Formats
|
||||
return false;
|
||||
}
|
||||
|
||||
IniWriter iw = new IniWriter(fs, new UTF8Encoding(false));
|
||||
IniWriter iw = new(fs, new UTF8Encoding(false));
|
||||
|
||||
// Write out the header
|
||||
WriteHeader(iw);
|
||||
|
||||
// Write out each of the machines and roms
|
||||
string lastgame = null;
|
||||
List<string> splitpath = new List<string>();
|
||||
List<string> splitpath = new();
|
||||
|
||||
// Use a sorted list of games to output
|
||||
foreach (string key in Items.SortedKeys)
|
||||
|
||||
Reference in New Issue
Block a user