From: Rolf Bjarne Kvinge Date: Wed, 27 Jan 2016 16:37:11 +0000 (+0100) Subject: [mono-api-info] Rework SkipAttribute to use ordinal string comparison, and no string... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=035c546b817a4872e23ddbc0a8c20bb2c60470b2 [mono-api-info] Rework SkipAttribute to use ordinal string comparison, and no string comparison unless needed. --- 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)