From 73ce30325f60310b2bce69b181a1d4f61399a33c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 14 Dec 2022 15:21:47 +0000 Subject: [PATCH] html: layout: flex: Scope reduce variables --- content/handlers/html/layout_flex.c | 4 ++-- 1 file 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;