* Remove unused local in RegexRunner.TextposDescription
* Remove redundant checks in RegexCharClass.AddRange
Commit migrated from https://github.com/dotnet/corefx/commit/
04bd3fa5c2c7d379c22b805ad840bc28423d5242
public void AddRange(char first, char last)
{
_rangelist.Add(new SingleRange(first, last));
- if (_canonical && _rangelist.Count > 0 &&
- first <= _rangelist[_rangelist.Count - 1].Last)
+ if (_canonical && first <= last)
{
_canonical = false;
}
internal virtual string TextposDescription()
{
var sb = new StringBuilder();
- int remaining;
sb.Append(runtextpos);
sb.Append('>');
- remaining = runtextend - runtextpos;
-
for (int i = runtextpos; i < runtextend; i++)
{
sb.Append(RegexCharClass.CharDescription(runtext[i]));