mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Reduce memory allocation
This commit is contained in:
parent
0c10e58c12
commit
57a0f2a50d
@ -300,8 +300,7 @@ namespace Nikse.SubtitleEdit.Logic.Dictionaries
|
||||
|
||||
if (word.Contains('¤'))
|
||||
{
|
||||
var regex = new Regex("[A-ZÆØÅÄÖÉÈÀÙÂÊÎÔÛËÏa-zæøåäöéèàùâêîôûëï]¤");
|
||||
if (regex.IsMatch(word))
|
||||
if (Regex.IsMatch(word, "[A-ZÆØÅÄÖÉÈÀÙÂÊÎÔÛËÏa-zæøåäöéèàùâêîôûëï]¤"))
|
||||
word = word.Replace('¤', 'o');
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
}
|
||||
sb.Append(fixedWord);
|
||||
lastWord = fixedWord;
|
||||
word = new StringBuilder();
|
||||
word.Clear();
|
||||
}
|
||||
sb.Append(text[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user