From 035c546b817a4872e23ddbc0a8c20bb2c60470b2 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 27 Jan 2016 17:37:11 +0100 Subject: [mono-api-info] Rework SkipAttribute to use ordinal string comparison, and no string comparison unless needed. --- mcs/tools/corcompare/mono-api-info.cs | 8 ++++---- 1 file 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) -- cgit v1.2.3