mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:07:34 +00:00
LibWeb: Cast unused smart-pointer return values to void
This commit is contained in:
parent
31ea222f97
commit
7196570f9b
10 changed files with 116 additions and 116 deletions
|
@ -398,7 +398,7 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer& block_c
|
|||
}
|
||||
|
||||
compute_width(child_box);
|
||||
layout_inside(child_box, layout_mode);
|
||||
(void)layout_inside(child_box, layout_mode);
|
||||
compute_height(child_box);
|
||||
|
||||
if (child_box.computed_values().position() == CSS::Position::Relative)
|
||||
|
@ -576,7 +576,7 @@ void BlockFormattingContext::layout_floating_child(Box& box, BlockContainer cons
|
|||
VERIFY(box.is_floating());
|
||||
|
||||
compute_width(box);
|
||||
layout_inside(box, LayoutMode::Default);
|
||||
(void)layout_inside(box, LayoutMode::Default);
|
||||
compute_height(box);
|
||||
|
||||
// First we place the box normally (to get the right y coordinate.)
|
||||
|
|
|
@ -143,7 +143,7 @@ void FlexFormattingContext::generate_anonymous_flex_items()
|
|||
}
|
||||
|
||||
flex_container().for_each_child_of_type<Box>([&](Box& child_box) {
|
||||
layout_inside(child_box, LayoutMode::Default);
|
||||
(void)layout_inside(child_box, LayoutMode::Default);
|
||||
// Skip anonymous text runs that are only whitespace.
|
||||
if (child_box.is_anonymous() && !child_box.first_child_of_type<BlockContainer>()) {
|
||||
bool contains_only_white_space = true;
|
||||
|
@ -444,7 +444,7 @@ float FlexFormattingContext::layout_for_maximum_main_size(Box& box)
|
|||
}
|
||||
}
|
||||
if (is_row_layout()) {
|
||||
layout_inside(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
(void)layout_inside(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
return box.width();
|
||||
} else {
|
||||
return BlockFormattingContext::compute_theoretical_height(box);
|
||||
|
|
|
@ -137,13 +137,13 @@ FormattingContext::ShrinkToFitResult FormattingContext::calculate_shrink_to_fit_
|
|||
{
|
||||
// Calculate the preferred width by formatting the content without breaking lines
|
||||
// other than where explicit line breaks occur.
|
||||
layout_inside(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
(void)layout_inside(box, LayoutMode::OnlyRequiredLineBreaks);
|
||||
float preferred_width = greatest_child_width(box);
|
||||
|
||||
// Also calculate the preferred minimum width, e.g., by trying all possible line breaks.
|
||||
// CSS 2.2 does not define the exact algorithm.
|
||||
|
||||
layout_inside(box, LayoutMode::AllPossibleLineBreaks);
|
||||
(void)layout_inside(box, LayoutMode::AllPossibleLineBreaks);
|
||||
float preferred_minimum_width = greatest_child_width(box);
|
||||
|
||||
return { preferred_width, preferred_minimum_width };
|
||||
|
@ -603,7 +603,7 @@ void FormattingContext::layout_absolutely_positioned_element(Box& box)
|
|||
auto specified_width = box.computed_values().width().resolved_or_auto(box, containing_block.width());
|
||||
|
||||
compute_width_for_absolutely_positioned_element(box);
|
||||
layout_inside(box, LayoutMode::Default);
|
||||
(void)layout_inside(box, LayoutMode::Default);
|
||||
compute_height_for_absolutely_positioned_element(box);
|
||||
|
||||
box_model.margin.left = box.computed_values().margin().left.resolved_or_auto(box, containing_block.width()).to_px(box);
|
||||
|
|
|
@ -215,7 +215,7 @@ void InlineFormattingContext::dimension_box_on_line(Box& box, LayoutMode layout_
|
|||
} else {
|
||||
inline_block.set_width(inline_block.computed_values().width().resolved_or_zero(inline_block, containing_block().width()).to_px(inline_block));
|
||||
}
|
||||
layout_inside(inline_block, layout_mode);
|
||||
(void)layout_inside(inline_block, layout_mode);
|
||||
|
||||
if (inline_block.computed_values().height().is_undefined_or_auto()) {
|
||||
// FIXME: (10.6.6) If 'height' is 'auto', the height depends on the element's descendants per 10.6.7.
|
||||
|
|
|
@ -76,9 +76,9 @@ void TableFormattingContext::calculate_column_widths(Box& row, Vector<float>& co
|
|||
row.for_each_child_of_type<TableCellBox>([&](auto& cell) {
|
||||
compute_width(cell);
|
||||
if (use_auto_layout) {
|
||||
layout_inside(cell, LayoutMode::OnlyRequiredLineBreaks);
|
||||
(void)layout_inside(cell, LayoutMode::OnlyRequiredLineBreaks);
|
||||
} else {
|
||||
layout_inside(cell, LayoutMode::Default);
|
||||
(void)layout_inside(cell, LayoutMode::Default);
|
||||
}
|
||||
column_widths[column_index] = max(column_widths[column_index], cell.width());
|
||||
column_index += cell.colspan();
|
||||
|
@ -98,9 +98,9 @@ void TableFormattingContext::layout_row(Box& row, Vector<float>& column_widths)
|
|||
|
||||
// Layout the cell contents a second time, now that we know its final width.
|
||||
if (use_auto_layout) {
|
||||
layout_inside(cell, LayoutMode::OnlyRequiredLineBreaks);
|
||||
(void)layout_inside(cell, LayoutMode::OnlyRequiredLineBreaks);
|
||||
} else {
|
||||
layout_inside(cell, LayoutMode::Default);
|
||||
(void)layout_inside(cell, LayoutMode::Default);
|
||||
}
|
||||
|
||||
size_t cell_colspan = cell.colspan();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue