mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-09-02 14:11:22 +00:00
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
|
@ -228,8 +228,7 @@ namespace Bind
|
||||||
// keep the first one.
|
// keep the first one.
|
||||||
if (!String.IsNullOrEmpty(s.ConstantCollection[t.Name].Reference))
|
if (!String.IsNullOrEmpty(s.ConstantCollection[t.Name].Reference))
|
||||||
{
|
{
|
||||||
s.ConstantCollection.Remove(t.Name);
|
s.ConstantCollection[t.Name] = t;
|
||||||
s.ConstantCollection.Add(t.Name, t);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue