mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Add a lock and some comments
This commit is contained in:
@@ -56,6 +56,7 @@ namespace SabreTools.Helper.Dats
|
||||
{
|
||||
string newkey = "";
|
||||
|
||||
// We want to get the key most appropriate for the given sorting type
|
||||
switch (bucketBy)
|
||||
{
|
||||
case SortedBy.CRC:
|
||||
@@ -113,11 +114,15 @@ namespace SabreTools.Helper.Dats
|
||||
break;
|
||||
}
|
||||
|
||||
if (!sortable.ContainsKey(newkey))
|
||||
// Add the DatItem to the temp dictionary
|
||||
lock (sortable)
|
||||
{
|
||||
sortable.Add(newkey, new List<DatItem>());
|
||||
if (!sortable.ContainsKey(newkey))
|
||||
{
|
||||
sortable.Add(newkey, new List<DatItem>());
|
||||
}
|
||||
sortable[newkey].Add(rom);
|
||||
}
|
||||
sortable[newkey].Add(rom);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user