1
Fork 0
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:
Andreas Kling 2021-11-06 01:20:51 +01:00
parent c4edb9f6c2
commit e2eabb4132
15 changed files with 56 additions and 53 deletions

View file

@ -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)));
}