mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-07 04:06:07 -05:00
grid: resize_without_reflow: don’t call min() on every loop iteration
This commit is contained in:
parent
9a498038d6
commit
434c8e4121
1 changed files with 1 additions and 1 deletions
2
grid.c
2
grid.c
|
|
@ -73,7 +73,7 @@ grid_resize_without_reflow(
|
|||
int new_offset = 0;
|
||||
|
||||
/* Copy old lines, truncating them if old rows were longer */
|
||||
for (int r = 0; r < min(old_screen_rows, new_screen_rows); r++) {
|
||||
for (int r = 0, n = min(old_screen_rows, new_screen_rows); r < n; r++) {
|
||||
const int old_row_idx = (grid->offset + r) & (old_rows - 1);
|
||||
const int new_row_idx = (new_offset + r) & (new_rows - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue