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 = "";
|
string newkey = "";
|
||||||
|
|
||||||
|
// We want to get the key most appropriate for the given sorting type
|
||||||
switch (bucketBy)
|
switch (bucketBy)
|
||||||
{
|
{
|
||||||
case SortedBy.CRC:
|
case SortedBy.CRC:
|
||||||
@@ -113,12 +114,16 @@ namespace SabreTools.Helper.Dats
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add the DatItem to the temp dictionary
|
||||||
|
lock (sortable)
|
||||||
|
{
|
||||||
if (!sortable.ContainsKey(newkey))
|
if (!sortable.ContainsKey(newkey))
|
||||||
{
|
{
|
||||||
sortable.Add(newkey, new List<DatItem>());
|
sortable.Add(newkey, new List<DatItem>());
|
||||||
}
|
}
|
||||||
sortable[newkey].Add(rom);
|
sortable[newkey].Add(rom);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Now go through and sort all of the individual lists
|
// Now go through and sort all of the individual lists
|
||||||
|
|||||||
Reference in New Issue
Block a user