From e9147bdeea34b862e029c4a500cd87049875df4b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 1 Nov 2022 13:03:00 +0000 Subject: html: layout: flex: Don't pass content around unnecessarily --- content/handlers/html/layout_flex.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'content/handlers') diff --git a/content/handlers/html/layout_flex.c b/content/handlers/html/layout_flex.c index 9242a831f..1d7478e74 100644 --- a/content/handlers/html/layout_flex.c +++ b/content/handlers/html/layout_flex.c @@ -314,7 +314,7 @@ static bool layout_flex_ctx__ensure_line(struct flex_ctx *ctx) } static struct flex_line_data *layout_flex__build_line(struct flex_ctx *ctx, - size_t item_index, int available_width, html_content *content) + size_t item_index, int available_width) { struct flex_line_data *line; int available_main; @@ -713,16 +713,14 @@ static bool layout_flex__resolve_line( static bool layout_flex__collect_items_into_lines( struct flex_ctx *ctx, - int available_width, - html_content *content) + int available_width) { size_t pos = 0; while (pos < ctx->item.count) { struct flex_line_data *line; - line = layout_flex__build_line(ctx, pos, - available_width, content); + line = layout_flex__build_line(ctx, pos, available_width); if (line == NULL) { return false; } @@ -782,8 +780,7 @@ bool layout_flex(struct box *flex, int available_width, layout_flex_ctx__populate_item_data(ctx, flex, available_width); /* Place items onto lines. */ - success = layout_flex__collect_items_into_lines(ctx, - available_width, content); + success = layout_flex__collect_items_into_lines(ctx, available_width); if (!success) { goto cleanup; } -- cgit v1.2.3