Userland: Cast unused BackgroundAction::construct() results to void

User code does not need to keep this alive, so casting to void is safe.
But maybe a bit weird.
This commit is contained in:
Sam Atkins 2021-12-02 11:47:21 +00:00 committed by Andreas Kling
commit d2024f04bd
Notes: sideshowbarker 2024-07-17 23:09:21 +09:00
7 changed files with 7 additions and 7 deletions

View file

@ -30,7 +30,7 @@ bool MonitorWidget::set_wallpaper(String path)
if (!is_different_to_current_wallpaper_path(path))
return false;
Threading::BackgroundAction<ErrorOr<NonnullRefPtr<Gfx::Bitmap>>>::construct(
(void)Threading::BackgroundAction<ErrorOr<NonnullRefPtr<Gfx::Bitmap>>>::construct(
[path](auto&) -> ErrorOr<NonnullRefPtr<Gfx::Bitmap>> {
if (path.is_empty())
return Error::from_errno(ENOENT);