Split RichString_(append|appendn|write) into wide and ascii

RichString_writeFrom takes a top spot during performance analysis due to the
calls to mbstowcs() and iswprint().

Most of the time we know in advance that we are only going to print regular
ASCII characters.
This commit is contained in:
Christian Göttsche
2020-12-04 14:44:57 +01:00
committed by BenBE
parent 5506925b34
commit 157086e750
26 changed files with 225 additions and 194 deletions

View File

@ -82,7 +82,7 @@ RichString* Panel_getHeader(Panel* this) {
}
inline void Panel_setHeader(Panel* this, const char* header) {
RichString_write(&(this->header), CRT_colors[PANEL_HEADER_FOCUS], header);
RichString_writeWide(&(this->header), CRT_colors[PANEL_HEADER_FOCUS], header);
this->needsRedraw = true;
}