Minor refact

This commit is contained in:
ivandrofly 2015-03-12 20:52:39 +00:00
parent 2877320b76
commit 0ad7bab4d2
5 changed files with 7 additions and 7 deletions

View File

@ -145,4 +145,4 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
}

View File

@ -141,4 +141,4 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
}

View File

@ -5,8 +5,8 @@ namespace Nikse.SubtitleEdit.Logic
{
public class NoBreakAfterItem : IComparable
{
public Regex Regex;
public string Text;
public readonly Regex Regex;
public readonly string Text;
public NoBreakAfterItem(Regex regex, string text)
{
@ -24,7 +24,7 @@ namespace Nikse.SubtitleEdit.Logic
if (Regex != null)
return Regex.IsMatch(line);
if (!string.IsNullOrEmpty(Text) && line.EndsWith(Text))
if (!string.IsNullOrEmpty(Text) && line.EndsWith(Text, StringComparison.Ordinal))
return true;
return false;

View File

@ -149,4 +149,4 @@ namespace Nikse.SubtitleEdit.Logic
}
}
}
}
}

View File

@ -274,4 +274,4 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
}
}
}
}
}