mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +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) {
|
if (removeMismatching) {
|
||||||
var result = new StringBuilder();
|
var result = new StringBuilder();
|
||||||
foreach (var c in text.ToString()) {
|
foreach (var c in text.ToString()) {
|
||||||
if (this.InputRule(this, c.ToString()))
|
if (this.InputRule(this, c.ToCachedString()))
|
||||||
result.Append(c);
|
result.Append(c);
|
||||||
}
|
}
|
||||||
text = result.ToString();
|
text = result.ToString();
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace MLEM.Formatting.Codes {
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GetReplacementString(GenericFont font) {
|
public override string GetReplacementString(GenericFont font) {
|
||||||
return GenericFont.OneEmSpace.ToString();
|
return GenericFont.OneEmSpace.ToCachedString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
Loading…
Reference in a new issue