From ce280537ded217a702346df641ac09eeade0f153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 26 Apr 2020 12:39:42 +0200 Subject: [PATCH] render: make 'glyph' assignment more readable --- render.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/render.c b/render.c index 32f5669c..c59723a2 100644 --- a/render.c +++ b/render.c @@ -403,9 +403,10 @@ render_cell(struct terminal *term, pixman_image_t *pix, } struct fcft_font *font = attrs_to_font(term, &cell->attrs); - const struct fcft_glyph *glyph = cell->wc != 0 - ? fcft_glyph_rasterize(font, cell->wc, term->font_subpixel) - : NULL; + const struct fcft_glyph *glyph = NULL; + + if (cell->wc != 0) + glyph = fcft_glyph_rasterize(font, cell->wc, term->font_subpixel); int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;