From 2114c27656e97dab97900bd3b52e6668e5670dad Mon Sep 17 00:00:00 2001 From: implicitfield <114500360+implicitfield@users.noreply.github.com> Date: Sun, 13 Aug 2023 01:38:53 +0300 Subject: [PATCH] Flood: Replace usage of DeprecatedString --- Userland/Games/Flood/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Userland/Games/Flood/main.cpp b/Userland/Games/Flood/main.cpp index 457685038d..4c4e564900 100644 --- a/Userland/Games/Flood/main.cpp +++ b/Userland/Games/Flood/main.cpp @@ -7,6 +7,7 @@ #include "BoardWidget.h" #include "MainWidget.h" #include "SettingsDialog.h" +#include #include #include #include @@ -145,12 +146,12 @@ ErrorOr serenity_main(Main::Arguments arguments) board_widget->board()->update_values(); update(); if (board_widget->board()->is_flooded()) { - DeprecatedString dialog_text("You have tied with the AI."sv); + auto dialog_text = "You have tied with the AI."_string; auto dialog_title("Congratulations!"sv); if (ai_moves - moves_made == 1) - dialog_text = "You defeated the AI by 1 move."sv; + dialog_text = "You defeated the AI by 1 move."_string; else if (ai_moves - moves_made > 1) - dialog_text = DeprecatedString::formatted("You defeated the AI by {} moves.", ai_moves - moves_made); + dialog_text = String::formatted("You defeated the AI by {} moves.", ai_moves - moves_made).release_value_but_fixme_should_propagate_errors(); else dialog_title = "Game over!"sv; GUI::MessageBox::show(window,