1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

AK: Move Handle from LibCore and name it MaybeOwned

The new name should make it abundantly clear what it does.
This commit is contained in:
Tim Schumacher 2023-01-22 04:24:18 +01:00 committed by Andrew Kaster
parent 5fa590de71
commit 5f2ea31816
16 changed files with 115 additions and 92 deletions

View file

@ -41,7 +41,7 @@ Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::create(Byte
MaybeLoaderError MP3LoaderPlugin::initialize()
{
m_bitstream = LOADER_TRY(Core::Stream::BigEndianInputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(*m_stream)));
m_bitstream = LOADER_TRY(Core::Stream::BigEndianInputBitStream::construct(MaybeOwned<Core::Stream::Stream>(*m_stream)));
TRY(synchronize());
@ -242,7 +242,7 @@ ErrorOr<MP3::MP3Frame, LoaderError> MP3LoaderPlugin::read_frame_data(MP3::Header
TRY(m_bit_reservoir.discard(old_reservoir_size - frame.main_data_begin));
auto reservoir_stream = TRY(Core::Stream::BigEndianInputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(m_bit_reservoir)));
auto reservoir_stream = TRY(Core::Stream::BigEndianInputBitStream::construct(MaybeOwned<Core::Stream::Stream>(m_bit_reservoir)));
for (size_t granule_index = 0; granule_index < 2; granule_index++) {
for (size_t channel_index = 0; channel_index < header.channel_count(); channel_index++) {