projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39b1f84
)
Replace in-place instead of removing/readding
author
Stefanos A.
<stapostol@gmail.com>
Sun, 3 Nov 2013 11:16:07 +0000
(12:16 +0100)
committer
Stefanos A.
<stapostol@gmail.com>
Sun, 3 Nov 2013 11:16:07 +0000
(12:16 +0100)
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.
Source/Bind/Utilities.cs
patch
|
blob
|
history
diff --git
a/Source/Bind/Utilities.cs
b/Source/Bind/Utilities.cs
index c0f0fe5b9c899d8074cf3f85b47a86bfb39fc6d6..38335c9246659a43e226c545e092fd9470d99090 100644
(file)
--- a/
Source/Bind/Utilities.cs
+++ b/
Source/Bind/Utilities.cs
@@
-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;
}
}