1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-05-18 00:48:57 -04:00

[screen] do not test bitfield twice

This commit is contained in:
Witold Filipczyk 2025-01-19 20:26:28 +01:00
parent dedba954b9
commit 49b50f2f7d

View File

@ -1423,14 +1423,14 @@ add_char_true(struct string *screen, struct screen_driver *driver,
int ymax = (term_)->height - 1; \
\
for (; y <= ymax; y++) { \
if (!test_bitfield_bit(screen->dirty, y) && !test_bitfield_bit(screen->dirty_image, y)) continue; \
int dirty = test_bitfield_bit(screen->dirty_image, y); \
if (!dirty && !test_bitfield_bit(screen->dirty, y)) continue; \
int ypos = y * (term_)->width; \
struct screen_char *current = &screen->last_image[ypos]; \
struct screen_char *pos = &screen->image[ypos]; \
struct screen_char *start_of_line = pos; \
int is_last_line = (y == ymax); \
int x = 0; \
int dirty = test_bitfield_bit(screen->dirty_image, y); \
clear_bitfield_bit(screen->dirty, y); \
clear_bitfield_bit(screen->dirty_image, y); \
\