1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +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

@ -24,19 +24,19 @@ Loader::Loader(NonnullOwnPtr<LoaderPlugin> plugin)
Result<NonnullOwnPtr<LoaderPlugin>, LoaderError> Loader::try_create(StringView path)
{
{
auto plugin = WavLoaderPlugin::try_create(path);
auto plugin = WavLoaderPlugin::create(path);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}
{
auto plugin = FlacLoaderPlugin::try_create(path);
auto plugin = FlacLoaderPlugin::create(path);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}
{
auto plugin = MP3LoaderPlugin::try_create(path);
auto plugin = MP3LoaderPlugin::create(path);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}
@ -47,19 +47,19 @@ Result<NonnullOwnPtr<LoaderPlugin>, LoaderError> Loader::try_create(StringView p
Result<NonnullOwnPtr<LoaderPlugin>, LoaderError> Loader::try_create(Bytes buffer)
{
{
auto plugin = WavLoaderPlugin::try_create(buffer);
auto plugin = WavLoaderPlugin::create(buffer);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}
{
auto plugin = FlacLoaderPlugin::try_create(buffer);
auto plugin = FlacLoaderPlugin::create(buffer);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}
{
auto plugin = MP3LoaderPlugin::try_create(buffer);
auto plugin = MP3LoaderPlugin::create(buffer);
if (!plugin.is_error())
return NonnullOwnPtr<LoaderPlugin>(plugin.release_value());
}