mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibGfx: Use ErrorOr<T> for Bitmap::clone()
This commit is contained in:
parent
c417820bff
commit
2da4cfcc80
6 changed files with 23 additions and 11 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue