mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
Replace ImageCode and TextField character ToString usage with ToCachedString for memory performace
This commit is contained in:
parent
b814839458
commit
8b29903444
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace MLEM.Formatting.Codes {
|
|||
|
||||
/// <inheritdoc />
|
||||
public override string GetReplacementString(GenericFont font) {
|
||||
return GenericFont.OneEmSpace.ToString();
|
||||
return GenericFont.OneEmSpace.ToCachedString();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
|
Loading…
Reference in a new issue