From 615c2cbcce53de07a1bd0c7f54d8439ad22e1832 Mon Sep 17 00:00:00 2001 From: creator1creeper1 Date: Thu, 23 Dec 2021 22:13:11 +0100 Subject: [PATCH] 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. --- Userland/Games/FlappyBug/Game.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Games/FlappyBug/Game.h b/Userland/Games/FlappyBug/Game.h index 8b0a46b103..6539836475 100644 --- a/Userland/Games/FlappyBug/Game.h +++ b/Userland/Games/FlappyBug/Game.h @@ -69,7 +69,7 @@ public: y = starting_y; } - RefPtr current_bitmap() const + NonnullRefPtr 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 bitmap() const + NonnullRefPtr bitmap() const { return cloud_bitmaps[bitmap_id]; }