[DatFile] Make call to Keys automatically do .ToList()

This commit is contained in:
Matt Nadareski
2017-10-30 21:15:37 -07:00
parent 0fa2a1a7e2
commit b2538502e6
15 changed files with 52 additions and 49 deletions

View File

@@ -583,8 +583,9 @@ namespace SabreTools.Library.Items
/// </summary>
/// <param name="datdata">Dat to match against</param>
/// <param name="remove">True to remove matched roms from the input, false otherwise (default)</param>
/// <param name="sorted">True if the DAT is already sorted accordingly, false otherwise (default)</param>
/// <returns>List of matched DatItem objects</returns>
public List<DatItem> GetDuplicates(DatFile datdata, bool remove = false)
public List<DatItem> GetDuplicates(DatFile datdata, bool remove = false, bool sorted = false)
{
List<DatItem> output = new List<DatItem>();
@@ -595,7 +596,7 @@ namespace SabreTools.Library.Items
}
// We want to get the proper key for the DatItem
string key = SortAndGetKey(datdata);
string key = SortAndGetKey(datdata, sorted);
// If the key doesn't exist, return the empty list
if (!datdata.Contains(key))