diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-12-14 15:21:47 +0000 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-12-14 22:53:35 +0000 |
commit | 73ce30325f60310b2bce69b181a1d4f61399a33c (patch) | |
tree | 24fa4ef7059f8c24424d63227079428e687d1e70 /content/handlers | |
parent | 3760bbcd2a0b6ce25ab2b38d9f7ac2c79d8713f9 (diff) | |
download | netsurf-73ce30325f60310b2bce69b181a1d4f61399a33c.tar.gz netsurf-73ce30325f60310b2bce69b181a1d4f61399a33c.tar.bz2 |
html: layout: flex: Scope reduce variables
Diffstat (limited to 'content/handlers')
-rw-r--r-- | content/handlers/html/layout_flex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/handlers/html/layout_flex.c b/content/handlers/html/layout_flex.c index b57f3e312..40e10632b 100644 --- a/content/handlers/html/layout_flex.c +++ b/content/handlers/html/layout_flex.c @@ -746,12 +746,12 @@ static bool layout_flex__place_line_items_main( struct flex_ctx *ctx, struct flex_line_data *line) { - enum box_side main_start = ctx->horizontal ? LEFT : TOP; size_t item_count = line->first + line->count; - int main_pos = ctx->flex->padding[main_start]; for (size_t i = line->first; i < item_count; i++) { + enum box_side main_start = ctx->horizontal ? LEFT : TOP; struct flex_item_data *item = &ctx->item.data[i]; + int main_pos = ctx->flex->padding[main_start]; struct box *b = item->box; int *box_pos_main; |