Brackets have no case.

Swapped in StringComparison.Ordinal for the literal comparison against [ and ] since those are non-caseable. This is a micro-improvement, but still good practice.
This commit is contained in:
Marc Brooks
2014-05-14 16:35:48 -05:00
parent 017a38c65b
commit e42d778db0
+3 -3
View File
@@ -341,8 +341,8 @@ namespace Newtonsoft.Json.Linq
if (string.IsNullOrEmpty(path))
return _initialPath;
if (_initialPath.EndsWith("]", StringComparison.OrdinalIgnoreCase)
|| path.StartsWith("[", StringComparison.OrdinalIgnoreCase))
if (_initialPath.EndsWith("]", StringComparison.Ordinal)
|| path.StartsWith("[", StringComparison.Ordinal))
path = _initialPath + path;
else
path = _initialPath + "." + path;
@@ -352,4 +352,4 @@ namespace Newtonsoft.Json.Linq
}
}
}
}
}