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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Bjarne Kvinge <rolf@xamarin.com>2016-01-27 19:36:00 +0300
committerRolf Bjarne Kvinge <rolf@xamarin.com>2016-01-28 16:49:03 +0300
commitf12fdef5480b6ce324c2f75170db3c4d459e6182 (patch)
tree0ff94d5ec4953354d7a248de5e09e43fd7e80bba
parent4350e463b47accbd9c5284a0d6779b67dfe58fb9 (diff)
[mono-api-info] Use ordinal string comparison. It's much faster.
-rw-r--r--mcs/tools/corcompare/mono-api-info.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/mcs/tools/corcompare/mono-api-info.cs b/mcs/tools/corcompare/mono-api-info.cs
index 29cc3e58a6d..1e5fcd0e021 100644
--- a/mcs/tools/corcompare/mono-api-info.cs
+++ b/mcs/tools/corcompare/mono-api-info.cs
@@ -486,7 +486,7 @@ namespace CorCompare
var ifaces = TypeHelper.GetInterfaces (type).
Where ((iface) => TypeHelper.IsPublic (iface)). // we're only interested in public interfaces
- OrderBy (s => s.FullName);
+ OrderBy (s => s.FullName, StringComparer.Ordinal);
if (ifaces.Any ()) {
writer.WriteStartElement ("interfaces");
@@ -699,7 +699,7 @@ namespace CorCompare
var methods = type.Methods;//type.GetMethods (flags);
foreach (MethodDefinition method in methods) {
- if (method.IsSpecialName && !method.Name.StartsWith ("op_"))
+ if (method.IsSpecialName && !method.Name.StartsWith ("op_", StringComparison.Ordinal))
continue;
// we're only interested in public or protected members
@@ -1143,7 +1143,7 @@ namespace CorCompare
AddAttribute ("value", "null");
} else {
string value = o.ToString ();
- if (attName.EndsWith ("GuidAttribute"))
+ if (attName.EndsWith ("GuidAttribute", StringComparison.Ordinal))
value = value.ToUpper ();
AddAttribute ("value", value);
}
@@ -1486,7 +1486,7 @@ namespace CorCompare
public int Compare (PropertyDefinition ma, PropertyDefinition mb)
{
- int res = String.Compare (ma.Name, mb.Name);
+ int res = String.Compare (ma.Name, mb.Name, StringComparison.Ordinal);
if (res != 0)
return res;
@@ -1511,7 +1511,7 @@ namespace CorCompare
{
MethodDefinition ma = (MethodDefinition) a;
MethodDefinition mb = (MethodDefinition) b;
- int res = String.Compare (ma.Name, mb.Name);
+ int res = String.Compare (ma.Name, mb.Name, StringComparison.Ordinal);
if (res != 0)
return res;
@@ -1540,7 +1540,7 @@ namespace CorCompare
string siga = Parameters.GetSignature (pia);
string sigb = Parameters.GetSignature (pib);
- return String.Compare (siga, sigb);
+ return String.Compare (siga, sigb, StringComparison.Ordinal);
}
}
}