Remove need for GetMachineForItem

This commit is contained in:
Matt Nadareski
2026-04-16 16:11:25 -04:00
parent ff69b83e05
commit 2884dcab5b
11 changed files with 42 additions and 87 deletions

View File

@@ -277,12 +277,6 @@ namespace SabreTools.Metadata.DatFiles
public IDictionary<long, Machine> GetMachinesDB()
=> ItemsDB.GetMachines();
/// <summary>
/// Get the index and machine associated with an item index
/// </summary>
public KeyValuePair<long, Machine?> GetMachineForItemDB(long itemIndex)
=> ItemsDB.GetMachineForItem(itemIndex);
/// <summary>
/// Get the index and source associated with a source index
/// </summary>
@@ -1215,8 +1209,8 @@ namespace SabreTools.Metadata.DatFiles
}
// If machine names don't match
string? xMachineName = ItemsDB.GetMachineForItem(x.Key).Value?.Name;
string? yMachineName = ItemsDB.GetMachineForItem(y.Key).Value?.Name;
string? xMachineName = ItemsDB.GetMachine(x.Value.MachineIndex).Value?.Name;
string? yMachineName = ItemsDB.GetMachine(y.Value.MachineIndex).Value?.Name;
if (xMachineName != yMachineName)
return nc.Compare(xMachineName, yMachineName);