[DatFile] Make sure that we use DatItem objects unless specifics are needed

This commit is contained in:
Matt Nadareski
2016-09-19 21:04:45 -07:00
parent 770f9d7275
commit 81f217b786

View File

@@ -2243,16 +2243,16 @@ namespace SabreTools.Helper
roms = DatItem.Merge(roms, logger); roms = DatItem.Merge(roms, logger);
} }
foreach (Rom rom in roms) foreach (DatItem rom in roms)
{ {
count++; count++;
string newkey = (norename ? "" string newkey = (norename ? ""
: rom.SystemID.ToString().PadLeft(10, '0') : rom.SystemID.ToString().PadLeft(10, '0')
+ "-" + "-"
+ rom.SourceID.ToString().PadLeft(10, '0') + "-") + rom.SourceID.ToString().PadLeft(10, '0') + "-")
+ (String.IsNullOrEmpty(rom.MachineName) + (String.IsNullOrEmpty(rom.MachineName)
? "Default" ? "Default"
: rom.MachineName.ToLowerInvariant()); : rom.MachineName.ToLowerInvariant());
if (sortable.ContainsKey(newkey)) if (sortable.ContainsKey(newkey))
{ {
sortable[newkey].Add(rom); sortable[newkey].Add(rom);