mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Consolodate the key variables since there's no need for separate ones.
This commit is contained in:
@@ -440,7 +440,7 @@ namespace SabreTools.Helper
|
|||||||
tempname = Regex.Match(tempname, @".*?\\(.*)").Groups[1].Value;
|
tempname = Regex.Match(tempname, @".*?\\(.*)").Groups[1].Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
string lastkey = "";
|
string key = "";
|
||||||
while (subreader.Read())
|
while (subreader.Read())
|
||||||
{
|
{
|
||||||
// We only want elements
|
// We only want elements
|
||||||
@@ -475,11 +475,11 @@ namespace SabreTools.Helper
|
|||||||
// If the rom is continue or ignore, add the size to the previous rom
|
// If the rom is continue or ignore, add the size to the previous rom
|
||||||
if (xtr.GetAttribute("loadflag") == "continue" || xtr.GetAttribute("loadflag") == "ignore")
|
if (xtr.GetAttribute("loadflag") == "continue" || xtr.GetAttribute("loadflag") == "ignore")
|
||||||
{
|
{
|
||||||
int index = dict[lastkey].Count() - 1;
|
int index = dict[key].Count() - 1;
|
||||||
RomData lastrom = dict[lastkey][index];
|
RomData lastrom = dict[key][index];
|
||||||
lastrom.Size += size;
|
lastrom.Size += size;
|
||||||
dict[lastkey].RemoveAt(index);
|
dict[key].RemoveAt(index);
|
||||||
dict[lastkey].Add(lastrom);
|
dict[key].Add(lastrom);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,8 +516,7 @@ namespace SabreTools.Helper
|
|||||||
if (!(crc == "" && md5 == "" && sha1 == ""))
|
if (!(crc == "" && md5 == "" && sha1 == ""))
|
||||||
{
|
{
|
||||||
// Get the new values to add
|
// Get the new values to add
|
||||||
string key = size + "-" + crc;
|
key = size + "-" + crc;
|
||||||
lastkey = key;
|
|
||||||
|
|
||||||
RomData value = new RomData
|
RomData value = new RomData
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user