mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +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
|
@ -44,7 +44,7 @@ String PaletteImpl::path(PathRole role) const
|
|||
|
||||
NonnullRefPtr<PaletteImpl> PaletteImpl::clone() const
|
||||
{
|
||||
auto new_theme_buffer = Core::AnonymousBuffer::create_with_size(m_theme_buffer.size());
|
||||
auto new_theme_buffer = Core::AnonymousBuffer::create_with_size(m_theme_buffer.size()).release_value();
|
||||
memcpy(new_theme_buffer.data<SystemTheme>(), &theme(), m_theme_buffer.size());
|
||||
return adopt_ref(*new PaletteImpl(move(new_theme_buffer)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue