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

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2008-12-24 21:24:22 +0300
committerSebastien Pouliot <sebastien@ximian.com>2008-12-24 21:24:22 +0300
commit93f3504fcd4d67e8c976ba93b958f5024e0416cb (patch)
treee40745f0f42690daabd4557db37be913d23e2647
parent2abfde44d951333e02eced3fee7173f5e8db59c2 (diff)
2008-12-24 Sebastien Pouliot <sebastien@ximian.com>
* DetectNonAlphaNumericsInTypeNamesRule.cs: Replace IndexOf("_") with IndexOf('_') since it's faster (self-test) but probably not much in this case since we were already using StringComparison.Ordinal. svn path=/trunk/mono-tools/; revision=122095
-rw-r--r--gendarme/rules/Gendarme.Rules.Naming/ChangeLog6
-rw-r--r--gendarme/rules/Gendarme.Rules.Naming/DetectNonAlphaNumericsInTypeNamesRule.cs4
2 files changed, 8 insertions, 2 deletions
diff --git a/gendarme/rules/Gendarme.Rules.Naming/ChangeLog b/gendarme/rules/Gendarme.Rules.Naming/ChangeLog
index 6ae52085..b9f09a15 100644
--- a/gendarme/rules/Gendarme.Rules.Naming/ChangeLog
+++ b/gendarme/rules/Gendarme.Rules.Naming/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-24 Sebastien Pouliot <sebastien@ximian.com>
+
+ * DetectNonAlphaNumericsInTypeNamesRule.cs: Replace IndexOf("_")
+ with IndexOf('_') since it's faster (self-test) but probably not much
+ in this case since we were already using StringComparison.Ordinal.
+
2008-12-23 Sebastien Pouliot <sebastien@ximian.com>
* AvoidTypeInterfaceInconsistencyRule.cs: New. Rule that checks
diff --git a/gendarme/rules/Gendarme.Rules.Naming/DetectNonAlphaNumericsInTypeNamesRule.cs b/gendarme/rules/Gendarme.Rules.Naming/DetectNonAlphaNumericsInTypeNamesRule.cs
index 30ce50af..f0055f2d 100644
--- a/gendarme/rules/Gendarme.Rules.Naming/DetectNonAlphaNumericsInTypeNamesRule.cs
+++ b/gendarme/rules/Gendarme.Rules.Naming/DetectNonAlphaNumericsInTypeNamesRule.cs
@@ -92,8 +92,8 @@ namespace Gendarme.Rules.Naming {
// so we just need to check the presence of underscore in method names
private static bool CheckName (string name, bool special)
{
- int start = special ? name.IndexOf ("_", StringComparison.Ordinal) + 1: 0;
- return (name.IndexOf ("_", start, StringComparison.Ordinal) == -1);
+ int start = special ? name.IndexOf ('_') + 1: 0;
+ return (name.IndexOf ('_', start) == -1);
}
private static bool UsedForComInterop (TypeDefinition type)