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:37:11 +0300
committerRolf Bjarne Kvinge <rolf@xamarin.com>2016-01-28 16:49:06 +0300
commit035c546b817a4872e23ddbc0a8c20bb2c60470b2 (patch)
tree7784bc00fe590803542776a9725b7687915e804f
parentf12fdef5480b6ce324c2f75170db3c4d459e6182 (diff)
[mono-api-info] Rework SkipAttribute to use ordinal string comparison, and no string comparison unless needed.
-rw-r--r--mcs/tools/corcompare/mono-api-info.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mcs/tools/corcompare/mono-api-info.cs b/mcs/tools/corcompare/mono-api-info.cs
index 1e5fcd0e021..4abfffd8946 100644
--- a/mcs/tools/corcompare/mono-api-info.cs
+++ b/mcs/tools/corcompare/mono-api-info.cs
@@ -1405,10 +1405,10 @@ namespace CorCompare
static bool SkipAttribute (CustomAttribute attribute)
{
- var type_name = Utils.CleanupTypeName (attribute.Constructor.DeclaringType);
-
- return !TypeHelper.IsPublic (attribute)
- || type_name.EndsWith ("TODOAttribute");
+ if (!TypeHelper.IsPublic (attribute))
+ return true;
+
+ return attribute.Constructor.DeclaringType.Name.EndsWith ("TODOAttribute", StringComparison.Ordinal);
}
public static void OutputAttributes (XmlWriter writer, params ICustomAttributeProvider[] providers)