mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +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('¤'))
|
if (word.Contains('¤'))
|
||||||
{
|
{
|
||||||
var regex = new Regex("[A-ZÆØÅÄÖÉÈÀÙÂÊÎÔÛËÏa-zæøåäöéèàùâêîôûëï]¤");
|
if (Regex.IsMatch(word, "[A-ZÆØÅÄÖÉÈÀÙÂÊÎÔÛËÏa-zæøåäöéèàùâêîôûëï]¤"))
|
||||||
if (regex.IsMatch(word))
|
|
||||||
word = word.Replace('¤', 'o');
|
word = word.Replace('¤', 'o');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
|||||||
}
|
}
|
||||||
sb.Append(fixedWord);
|
sb.Append(fixedWord);
|
||||||
lastWord = fixedWord;
|
lastWord = fixedWord;
|
||||||
word = new StringBuilder();
|
word.Clear();
|
||||||
}
|
}
|
||||||
sb.Append(text[i]);
|
sb.Append(text[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user