FlappyBug: Make bitmap() methods return NonnullRefPtrs

We are already storing these as NonnullRefPtrs, so we might
as well make the functions return them as such.
This commit is contained in:
creator1creeper1 2021-12-23 22:13:11 +01:00 committed by Brian Gianforcaro
parent 6f592a32cc
commit 615c2cbcce
Notes: sideshowbarker 2024-07-17 22:18:41 +09:00

View file

@ -69,7 +69,7 @@ public:
y = starting_y;
}
RefPtr<Gfx::Bitmap> current_bitmap() const
NonnullRefPtr<Gfx::Bitmap> current_bitmap() const
{
return velocity < 0 ? falling_bitmap : flapping_bitmap;
}
@ -153,7 +153,7 @@ public:
y = get_random_uniform(game_height / 2) + bitmap()->height();
}
RefPtr<Gfx::Bitmap> bitmap() const
NonnullRefPtr<Gfx::Bitmap> bitmap() const
{
return cloud_bitmaps[bitmap_id];
}