diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-10-29 22:15:58 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-10-29 22:15:58 +0100 |
commit | 094eb9ae48d1f064bbf8810a2560b344b6dc22cf (patch) | |
tree | 95d170fdaedf749bd76d2e9edbd8f42c6780eda6 | |
parent | 8615964c3fd381ef6d9a20487b9120135182dfd1 (diff) | |
download | netsurf-094eb9ae48d1f064bbf8810a2560b344b6dc22cf.tar.gz netsurf-094eb9ae48d1f064bbf8810a2560b344b6dc22cf.tar.bz2 |
layout: flex: Squash main is usually a function warning
-rw-r--r-- | content/handlers/html/layout_flex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/handlers/html/layout_flex.c b/content/handlers/html/layout_flex.c index 54bab70c3..07c3b5b89 100644 --- a/content/handlers/html/layout_flex.c +++ b/content/handlers/html/layout_flex.c @@ -336,21 +336,21 @@ static struct flex_line_data *layout_flex__build_line(struct flex_ctx *ctx, while (item_index < ctx->item.count) { struct flex_item_data *item = &ctx->item.data[item_index]; struct box *b = item->box; - int main; + int pos_main; - main = ctx->horizontal ? + pos_main = ctx->horizontal ? item->main_size : b->height + lh__delta_outer_main(ctx->flex, b); if (ctx->wrap == CSS_FLEX_WRAP_NOWRAP || - main + used_main <= available_main || + pos_main + used_main <= available_main || lh__box_is_absolute(item->box) || available_main == AUTO || line->count == 0 || - main == 0) { + pos_main == 0) { if (lh__box_is_absolute(item->box) == false) { line->main_size += item->main_size; - used_main += main; + used_main += pos_main; } item->line = ctx->line.count; line->count++; |