Make match sets immutable

This commit is contained in:
Matt Nadareski
2024-06-12 14:49:16 -04:00
parent 7f08684e9a
commit 9d5dfaaa68
2 changed files with 4 additions and 3 deletions

View File

@@ -176,6 +176,7 @@
- Simplify DIC DMI location finding
- Move track full matching to separate loop
- Fix... something with Linux publish script
- Make match sets immutable
### 3.1.9a (2024-05-21)

View File

@@ -183,7 +183,7 @@ namespace MPF.Frontend.Tools
// Setup the checks
bool allFound = true;
List<List<int>> foundIdSets = [];
List<int[]> foundIdSets = [];
// Loop through all of the hashdata to find matching IDs
resultProgress?.Report(ResultEventArgs.Success("Finding disc matches on Redump..."));
@@ -234,7 +234,7 @@ namespace MPF.Frontend.Tools
resultProgress?.Report(ResultEventArgs.Failure(result));
// Add the found IDs to the map
foundIdSets.Add(foundIds ?? []);
foundIdSets.Add(foundIds?.ToArray() ?? []);
// Ensure that all tracks are found
allFound &= singleFound;
@@ -250,7 +250,7 @@ namespace MPF.Frontend.Tools
// First track is always all IDs
if (fullyMatchedIDs == null)
{
fullyMatchedIDs = set;
fullyMatchedIDs = [.. set];
continue;
}