diff --git a/Userland/Games/BrickGame/BrickGame.cpp b/Userland/Games/BrickGame/BrickGame.cpp index c951b9d881..e0340473d6 100644 --- a/Userland/Games/BrickGame/BrickGame.cpp +++ b/Userland/Games/BrickGame/BrickGame.cpp @@ -535,7 +535,7 @@ void BrickGame::paint_cell(GUI::Painter& painter, Gfx::IntRect rect, bool is_on) painter.fill_rect(rect, is_on ? m_front_color : m_shadow_color); } -void BrickGame::paint_sidebar_text(GUI::Painter& painter, int row, DeprecatedString const& text) +void BrickGame::paint_sidebar_text(GUI::Painter& painter, int row, StringView text) { auto const text_width = static_cast(ceilf(font().width(text))); auto const entire_area_rect { frame_inner_rect() }; @@ -596,10 +596,10 @@ void BrickGame::paint_game(GUI::Painter& painter, Gfx::IntRect const& rect) paint_cell(painter, cell_rect(position), (*m_brick_game)[board_position]); } - paint_sidebar_text(painter, 0, DeprecatedString::formatted("Score: {}", m_brick_game->score())); - paint_sidebar_text(painter, 1, DeprecatedString::formatted("Level: {}", m_brick_game->level())); - paint_sidebar_text(painter, 4, DeprecatedString::formatted("Hi-Score: {}", m_high_score)); - paint_sidebar_text(painter, 12, "Next:"); + paint_sidebar_text(painter, 0, String::formatted("Score: {}", m_brick_game->score()).release_value_but_fixme_should_propagate_errors()); + paint_sidebar_text(painter, 1, String::formatted("Level: {}", m_brick_game->level()).release_value_but_fixme_should_propagate_errors()); + paint_sidebar_text(painter, 4, String::formatted("Hi-Score: {}", m_high_score).release_value_but_fixme_should_propagate_errors()); + paint_sidebar_text(painter, 12, "Next:"sv); auto const hint_rect = Gfx::IntRect { frame_inner_rect().x() + frame_inner_rect().width() - 105, @@ -640,7 +640,7 @@ void BrickGame::game_over() Config::write_i32(m_app_name, m_app_name, "HighScore"sv, int(m_high_score = current_score)); } GUI::MessageBox::show(window(), - text.to_deprecated_string(), + text.string_view(), "Game Over"sv, GUI::MessageBox::Type::Information); diff --git a/Userland/Games/BrickGame/BrickGame.h b/Userland/Games/BrickGame/BrickGame.h index 6e9c30cf28..ab71d1fc28 100644 --- a/Userland/Games/BrickGame/BrickGame.h +++ b/Userland/Games/BrickGame/BrickGame.h @@ -26,7 +26,7 @@ private: virtual void keydown_event(GUI::KeyEvent&) override; virtual void timer_event(Core::TimerEvent&) override; - void paint_sidebar_text(GUI::Painter&, int row, DeprecatedString const&); + void paint_sidebar_text(GUI::Painter&, int row, StringView); void paint_paused_text(GUI::Painter&); void paint_cell(GUI::Painter&, Gfx::IntRect, bool); void paint_game(GUI::Painter&, Gfx::IntRect const&);