Use Contains(char[]) instead of multiple Contains(char) (SubtitleFormats/Cavena890)

This commit is contained in:
Waldi Ravens 2015-06-14 18:53:53 +02:00
parent 6e71051f19
commit a3264849c4

View File

@ -205,17 +205,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
{
foreach (Paragraph p in subtitle.Paragraphs)
{
if (p.Text.Contains('的') ||
p.Text.Contains('是') ||
p.Text.Contains('啊') ||
p.Text.Contains('吧') ||
p.Text.Contains('好') ||
p.Text.Contains('吧') ||
p.Text.Contains('亲') ||
p.Text.Contains('爱') ||
p.Text.Contains('的') ||
p.Text.Contains('早') ||
p.Text.Contains('上'))
if (p.Text.Contains(new[] { '的', '是', '啊', '吧', '好', '吧', '亲', '爱', '的', '早', '上' }))
{
_languageIdLine1 = LanguageIdChineseSimplified;
_languageIdLine2 = LanguageIdChineseSimplified;