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

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
parent 92f8514a85
commit d2024f04bd
7 changed files with 7 additions and 7 deletions

View file

@ -807,7 +807,7 @@ bool Compositor::set_wallpaper_mode(const String& mode)
bool Compositor::set_wallpaper(const String& path, Function<void(bool)>&& callback)
{
Threading::BackgroundAction<ErrorOr<NonnullRefPtr<Gfx::Bitmap>>>::construct(
(void)Threading::BackgroundAction<ErrorOr<NonnullRefPtr<Gfx::Bitmap>>>::construct(
[path](auto&) {
return Gfx::Bitmap::try_load_from_file(path);
},