1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 04:53:29 +01:00

Replace ImageCode and TextField character ToString usage with ToCachedString for memory performace

This commit is contained in:
Ell 2020-09-28 20:43:37 +02:00
parent b814839458
commit 8b29903444
2 changed files with 2 additions and 2 deletions

View file

@ -270,7 +270,7 @@ namespace MLEM.Ui.Elements {
if (removeMismatching) {
var result = new StringBuilder();
foreach (var c in text.ToString()) {
if (this.InputRule(this, c.ToString()))
if (this.InputRule(this, c.ToCachedString()))
result.Append(c);
}
text = result.ToString();

View file

@ -25,7 +25,7 @@ namespace MLEM.Formatting.Codes {
/// <inheritdoc />
public override string GetReplacementString(GenericFont font) {
return GenericFont.OneEmSpace.ToString();
return GenericFont.OneEmSpace.ToCachedString();
}
/// <inheritdoc />