Minor code cleanup

This commit is contained in:
thefiddler 2013-11-11 10:01:15 +01:00
parent af16be42d5
commit 0fcf3a2f40

View file

@ -235,18 +235,19 @@ namespace Bind.Structures
{
if (ContainsKey(f.Extension))
{
int index = this[f.Extension].IndexOf(f);
var list = this[f.Extension];
int index = list.IndexOf(f);
if (index == -1)
{
Add(f);
}
else
{
Function existing = this[f.Extension][index];
Function existing = list[index];
if ((existing.Parameters.HasUnsignedParameters && !unsignedFunctions.IsMatch(existing.Name) && unsignedFunctions.IsMatch(f.Name)) ||
(!existing.Parameters.HasUnsignedParameters && unsignedFunctions.IsMatch(existing.Name) && !unsignedFunctions.IsMatch(f.Name)))
{
this[f.Extension][index] = f;
list[index] = f;
}
}
}