From 9783068760ce2366d69260c4313866be80fc9836 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 12 Feb 2025 15:49:39 -0500 Subject: [PATCH] Split CreateDatFile overload for clarity of use --- SabreTools.DatFiles/Parser.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SabreTools.DatFiles/Parser.cs b/SabreTools.DatFiles/Parser.cs index c722cfd0..c1e669d0 100644 --- a/SabreTools.DatFiles/Parser.cs +++ b/SabreTools.DatFiles/Parser.cs @@ -28,13 +28,19 @@ namespace SabreTools.DatFiles #endregion + /// + /// Create a generic DatFile to be used + /// + /// Empty, default DatFile implementation + public static DatFile CreateDatFile() => CreateDatFile(DatFormat.Logiqx, baseDat: null); + /// /// Create a specific type of DatFile to be used based on a format and a base DAT /// - /// Format of the DAT to be created, default is - /// DatFile containing the information to use in specific operations, default is null + /// Format of the DAT to be created + /// DatFile containing the information to use in specific operations /// DatFile of the specific internal type that corresponds to the inputs - public static DatFile CreateDatFile(DatFormat datFormat = DatFormat.Logiqx, DatFile? baseDat = null) + public static DatFile CreateDatFile(DatFormat datFormat, DatFile? baseDat) { return datFormat switch { @@ -80,7 +86,7 @@ namespace SabreTools.DatFiles public static DatFile CreateDatFile(DatHeader datHeader, DatModifiers datModifiers) { DatFormat format = datHeader.GetFieldValue(DatHeader.DatFormatKey); - DatFile datFile = CreateDatFile(format); + DatFile datFile = CreateDatFile(format, baseDat: null); datFile.SetHeader(datHeader); datFile.SetModifiers(datModifiers); return datFile;