mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibCore: Use ErrorOr<T> in Core::AnonymousBuffer
This commit is contained in:
parent
c4edb9f6c2
commit
e2eabb4132
15 changed files with 56 additions and 53 deletions
|
@ -34,7 +34,9 @@ PageHost::~PageHost()
|
|||
void PageHost::setup_palette()
|
||||
{
|
||||
// FIXME: Get the proper palette from our peer somehow
|
||||
auto buffer = Core::AnonymousBuffer::create_with_size(sizeof(Gfx::SystemTheme));
|
||||
auto buffer_or_error = Core::AnonymousBuffer::create_with_size(sizeof(Gfx::SystemTheme));
|
||||
VERIFY(!buffer_or_error.is_error());
|
||||
auto buffer = buffer_or_error.release_value();
|
||||
auto* theme = buffer.data<Gfx::SystemTheme>();
|
||||
theme->color[(int)Gfx::ColorRole::Window] = Color::Magenta;
|
||||
theme->color[(int)Gfx::ColorRole::WindowText] = Color::Cyan;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue