mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add nullability to the two programs (not enforced)
This commit is contained in:
@@ -19,7 +19,7 @@ namespace RombaSharp.Features
|
||||
Description = "Creates a DAT file with those entries that are in -new DAT.";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = @"Creates a DAT file with those entries that are in -new DAT files and not in -old DAT files. Ignores those entries in -old that are not in -new.";
|
||||
Features = new Dictionary<string, Feature>();
|
||||
Features = [];
|
||||
|
||||
// Common Features
|
||||
AddCommonFeatures();
|
||||
@@ -29,19 +29,19 @@ namespace RombaSharp.Features
|
||||
AddFeature(NewStringInput);
|
||||
}
|
||||
|
||||
public override bool ProcessFeatures(Dictionary<string, Feature> features)
|
||||
public override bool ProcessFeatures(Dictionary<string, Feature?> features)
|
||||
{
|
||||
// If the base fails, just fail out
|
||||
if (!base.ProcessFeatures(features))
|
||||
return false;
|
||||
|
||||
// Get feature flags
|
||||
string olddat = GetString(features, OldStringValue);
|
||||
string outdat = GetString(features, OutStringValue);
|
||||
string newdat = GetString(features, NewStringValue);
|
||||
string? olddat = GetString(features, OldStringValue);
|
||||
string? outdat = GetString(features, OutStringValue);
|
||||
string? newdat = GetString(features, NewStringValue);
|
||||
|
||||
// Ensure the output directory
|
||||
outdat.Ensure(create: true);
|
||||
outdat = outdat?.Ensure(create: true);
|
||||
|
||||
// Check that all required files exist
|
||||
if (!File.Exists(olddat))
|
||||
@@ -62,7 +62,7 @@ namespace RombaSharp.Features
|
||||
// Diff against the new datfile
|
||||
DatFile intDat = Parser.CreateAndParse(newdat);
|
||||
DatFileTool.DiffAgainst(datfile, intDat, false);
|
||||
Writer.Write(intDat, outdat);
|
||||
Writer.Write(intDat, outdat!);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user