mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-25 18:52:22 -05:00
Kernel+LibVT: Use MUST + try_prepend / try_append
In preparation for making Vector::append + Vector::prepend unavailable during compilation of the Kernel. This specific file is compiled into the Kernel as well as LibVT.
This commit is contained in:
parent
6c66311ade
commit
538986c991
Notes:
sideshowbarker
2024-07-17 21:36:04 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/538986c9917 Pull-request: https://github.com/SerenityOS/serenity/pull/11588
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ void Line::push_cells_into_next_line(size_t new_length, Line* next_line, bool cu
|
|||
}
|
||||
}
|
||||
|
||||
next_line->m_cells.prepend(m_cells.span().slice_from_end(cells_to_push_into_next_line).data(), cells_to_push_into_next_line);
|
||||
MUST(next_line->m_cells.try_prepend(m_cells.span().slice_from_end(cells_to_push_into_next_line).data(), cells_to_push_into_next_line));
|
||||
m_cells.remove(m_cells.size() - cells_to_push_into_next_line, cells_to_push_into_next_line);
|
||||
if (m_terminated_at.has_value())
|
||||
m_terminated_at = m_terminated_at.value() - cells_to_push_into_next_line;
|
||||
|
@ -110,7 +110,7 @@ void Line::take_cells_from_next_line(size_t new_length, Line* next_line, bool cu
|
|||
cursor->column -= cells_to_grab_from_next_line;
|
||||
}
|
||||
}
|
||||
m_cells.append(next_line->m_cells.data(), cells_to_grab_from_next_line);
|
||||
MUST(m_cells.try_append(next_line->m_cells.data(), cells_to_grab_from_next_line));
|
||||
next_line->m_cells.remove(0, cells_to_grab_from_next_line);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue