diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-06 11:52:35 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-08 00:35:27 +0100 |
commit | 2da4cfcc80b5fcd322c5194a829b76571616e5b4 (patch) | |
tree | be401c53feed6f52e74033c02879543ef1f9fd12 /Userland/Libraries/LibCards/Card.cpp | |
parent | c417820bff1b24843359800b41bcec8c8fbd5788 (diff) | |
download | serenity-2da4cfcc80b5fcd322c5194a829b76571616e5b4.zip |
LibGfx: Use ErrorOr<T> for Bitmap::clone()
Diffstat (limited to 'Userland/Libraries/LibCards/Card.cpp')
-rw-r--r-- | Userland/Libraries/LibCards/Card.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCards/Card.cpp b/Userland/Libraries/LibCards/Card.cpp index 2c27912d86..78b53a5361 100644 --- a/Userland/Libraries/LibCards/Card.cpp +++ b/Userland/Libraries/LibCards/Card.cpp @@ -172,8 +172,7 @@ void Card::clear_and_draw(GUI::Painter& painter, const Color& background_color) NonnullRefPtr<Gfx::Bitmap> Card::invert_bitmap(Gfx::Bitmap& bitmap) { - auto inverted_bitmap = bitmap.clone(); - VERIFY(inverted_bitmap); + auto inverted_bitmap = bitmap.clone().release_value_but_fixme_should_propagate_errors(); for (int y = 0; y < inverted_bitmap->height(); y++) { for (int x = 0; x < inverted_bitmap->width(); x++) { inverted_bitmap->set_pixel(x, y, inverted_bitmap->get_pixel(x, y).inverted()); |