Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2017-02-13 22:40:06 +0300
committerJb Evain <jb@evain.net>2017-02-13 22:40:06 +0300
commitc788c90ac3876b7cb1a78c31c6a70aad3c4eee84 (patch)
tree79e68b941452085cc0588b5918933172deddce53
parent5088870debfaaec5b4cc4b68ede1d10eba8b128c (diff)
Turns out the list ctor + dict implementing ICollection of KVP will do the right thing
-rw-r--r--Mono.Cecil.Metadata/Buffers.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Mono.Cecil.Metadata/Buffers.cs b/Mono.Cecil.Metadata/Buffers.cs
index d219546..0eb0b48 100644
--- a/Mono.Cecil.Metadata/Buffers.cs
+++ b/Mono.Cecil.Metadata/Buffers.cs
@@ -356,10 +356,7 @@ namespace Mono.Cecil.Metadata {
static List<KeyValuePair<string, uint>> SortStrings (Dictionary<string, uint> strings)
{
- var sorted = new List<KeyValuePair<string, uint>> (strings.Count);
- foreach (var pair in strings)
- sorted.Add (pair);
-
+ var sorted = new List<KeyValuePair<string, uint>> (strings);
sorted.Sort (new SuffixSort ());
return sorted;
}