mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-17 22:18:41 +09:00
Author: https://github.com/creator1creeper1 Commit: https://github.com/SerenityOS/serenity/commit/615c2cbcce5 Pull-request: https://github.com/SerenityOS/serenity/pull/11383 Reviewed-by: https://github.com/sin-ack ✅
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue