1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Kernel: Use MUST + Vector::try_append instead of Vector::append

In preparation for making Vector::append unavailable during
compilation of the Kernel.
This commit is contained in:
Brian Gianforcaro 2022-01-03 03:20:39 -08:00 committed by Andreas Kling
parent 8bcce82887
commit 24066ba5ef
5 changed files with 8 additions and 8 deletions

View file

@ -170,7 +170,7 @@ ErrorOr<void> FramebufferDevice::create_framebuffer()
NonnullRefPtrVector<Memory::PhysicalPage> pages;
for (auto i = 0u; i < num_needed_pages; ++i) {
pages.append(write_sink_page);
TRY(pages.try_append(write_sink_page));
}
m_framebuffer_sink_vmobject = TRY(Memory::AnonymousVMObject::try_create_with_physical_pages(pages.span()));