1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:38:13 +00:00

LibAudio: Remove try_ prefix from fallible LoaderPlugin methods

This commit is contained in:
Linus Groh 2023-01-28 20:12:17 +00:00 committed by Jelle Raaijmakers
parent 108ea2b921
commit ee0297d9ec
11 changed files with 22 additions and 22 deletions

View file

@ -19,7 +19,7 @@ MP3LoaderPlugin::MP3LoaderPlugin(NonnullOwnPtr<Core::Stream::SeekableStream> str
{
}
Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::try_create(StringView path)
Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::create(StringView path)
{
auto stream = LOADER_TRY(Core::Stream::BufferedFile::create(LOADER_TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Read))));
auto loader = make<MP3LoaderPlugin>(move(stream));
@ -29,7 +29,7 @@ Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::try_create(
return loader;
}
Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::try_create(Bytes buffer)
Result<NonnullOwnPtr<MP3LoaderPlugin>, LoaderError> MP3LoaderPlugin::create(Bytes buffer)
{
auto stream = LOADER_TRY(Core::Stream::FixedMemoryStream::construct(buffer));
auto loader = make<MP3LoaderPlugin>(move(stream));