Replace in-place instead of removing/readding
There is no reason to remove and readd a Constant in order to replace it in a ConstantCollection. We can actually do that in-place.
This commit is contained in:
parent
39b1f84fc8
commit
513fa728d0
1 changed files with 1 additions and 2 deletions
|
@ -228,8 +228,7 @@ namespace Bind
|
|||
// keep the first one.
|
||||
if (!String.IsNullOrEmpty(s.ConstantCollection[t.Name].Reference))
|
||||
{
|
||||
s.ConstantCollection.Remove(t.Name);
|
||||
s.ConstantCollection.Add(t.Name, t);
|
||||
s.ConstantCollection[t.Name] = t;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue