From 243568958f713e1968e5fc2d518f15c3e85ca087 Mon Sep 17 00:00:00 2001 From: cancel Date: Fri, 14 Dec 2018 09:28:53 +0900 Subject: [PATCH] Hoist fetch out of loop --- tui_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tui_main.c b/tui_main.c index 90738d5..c9087a2 100644 --- a/tui_main.c +++ b/tui_main.c @@ -466,6 +466,7 @@ void draw_glyphs_grid(WINDOW* win, int draw_y, int draw_x, int draw_h, if (rows == 0 || cols == 0) return; bool use_rulers = ruler_spacing_y != 0 && ruler_spacing_x != 0; + chtype bullet = ACS_BULLET; for (Usz iy = 0; iy < rows; ++iy) { Usz line_offset = (offset_y + iy) * field_w + offset_x; Glyph const* g_row = gbuffer + line_offset; @@ -479,7 +480,7 @@ void draw_glyphs_grid(WINDOW* win, int draw_y, int draw_x, int draw_h, if (use_y_ruler && (ix + offset_x) % ruler_spacing_x == 0) ch = '+'; else - ch = ACS_BULLET; + ch = bullet; } else { ch = (chtype)g; }