mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
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:
parent
6f592a32cc
commit
615c2cbcce
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ public:
|
||||||
y = starting_y;
|
y = starting_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<Gfx::Bitmap> current_bitmap() const
|
NonnullRefPtr<Gfx::Bitmap> current_bitmap() const
|
||||||
{
|
{
|
||||||
return velocity < 0 ? falling_bitmap : flapping_bitmap;
|
return velocity < 0 ? falling_bitmap : flapping_bitmap;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ public:
|
||||||
y = get_random_uniform(game_height / 2) + bitmap()->height();
|
y = get_random_uniform(game_height / 2) + bitmap()->height();
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<Gfx::Bitmap> bitmap() const
|
NonnullRefPtr<Gfx::Bitmap> bitmap() const
|
||||||
{
|
{
|
||||||
return cloud_bitmaps[bitmap_id];
|
return cloud_bitmaps[bitmap_id];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue