diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-06-24 09:02:47 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-06-26 16:39:24 +0000 |
| commit | 5e046e6a84badbf21e99799db42712026cae2029 (patch) | |
| tree | 8013ae2cd34ee4864280cea8d98da54cb5e69774 | |
| parent | render: underlines: minor perf-tweak: early break out (diff) | |
csi: sgr_reset(): avoid using memset()
This _should_ be what the compiler does anyway (i.e. it _should_
replace the memset() with inline MOVs). But let's be sure.
| -rw-r--r-- | csi.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -32,9 +32,8 @@ static void sgr_reset(struct terminal *term) { - /* TODO: can we drop this check? */ - memset(&term->vt.attrs, 0, sizeof(term->vt.attrs)); - memset(&term->vt.curly, 0, sizeof(term->vt.curly)); + term->vt.attrs = (struct attributes){0}; + term->vt.curly = (struct curly_range_data){0}; term->bits_affecting_ascii_printer.curly_style = false; term->bits_affecting_ascii_printer.curly_color = false; |
