AK: Make Vector use size_t for its size and capacity

This commit is contained in:
Andreas Kling 2020-02-25 14:49:47 +01:00
parent 9c6f7d3e7d
commit ceec1a7d38
Notes: sideshowbarker 2024-07-19 09:04:32 +09:00
94 changed files with 323 additions and 317 deletions

View file

@ -143,7 +143,7 @@ void LayoutBlock::layout_inline_children()
float justified_space_width = whitespace_count ? (excess_horizontal_space_including_whitespace / (float)whitespace_count) : 0;
for (int i = 0; i < line_box.fragments().size(); ++i) {
for (size_t i = 0; i < line_box.fragments().size(); ++i) {
auto& fragment = line_box.fragments()[i];
// Vertically align everyone's bottom to the line.
// FIXME: Support other kinds of vertical alignment.
@ -156,7 +156,7 @@ void LayoutBlock::layout_inline_children()
float diff = justified_space_width - fragment.rect().width();
fragment.rect().set_width(justified_space_width);
// Shift subsequent sibling fragments to the right to adjust for change in width.
for (int j = i + 1; j < line_box.fragments().size(); ++j) {
for (size_t j = i + 1; j < line_box.fragments().size(); ++j) {
line_box.fragments()[j].rect().move_by(diff, 0);
}
}