summaryrefslogtreecommitdiff
path: root/Userland/Games/MasterWord/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Games/MasterWord/main.cpp')
-rw-r--r--Userland/Games/MasterWord/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Games/MasterWord/main.cpp b/Userland/Games/MasterWord/main.cpp
index c5c9dde320..ef1515267b 100644
--- a/Userland/Games/MasterWord/main.cpp
+++ b/Userland/Games/MasterWord/main.cpp
@@ -75,9 +75,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(settings_menu->try_add_action(GUI::Action::create("Set &Word Length", [&](auto&) {
auto word_length = Config::read_i32("MasterWord"sv, ""sv, "word_length"sv, 5);
- auto word_length_string = DeprecatedString::number(word_length);
+ auto word_length_string = String::number(word_length).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window, word_length_string, "Word length:"sv, "MasterWord"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
- auto maybe_word_length = word_length_string.template to_uint();
+ auto maybe_word_length = AK::StringUtils::convert_to_uint(word_length_string);
if (!maybe_word_length.has_value() || maybe_word_length.value() < shortest_word || maybe_word_length.value() > longest_word) {
GUI::MessageBox::show(window, DeprecatedString::formatted("Please enter a number between {} and {}.", shortest_word, longest_word), "MasterWord"sv);
return;
@@ -90,9 +90,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
})));
TRY(settings_menu->try_add_action(GUI::Action::create("Set &Number Of Guesses", [&](auto&) {
auto max_guesses = Config::read_i32("MasterWord"sv, ""sv, "max_guesses"sv, 5);
- auto max_guesses_string = DeprecatedString::number(max_guesses);
+ auto max_guesses_string = String::number(max_guesses).release_value_but_fixme_should_propagate_errors();
if (GUI::InputBox::show(window, max_guesses_string, "Maximum number of guesses:"sv, "MasterWord"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
- auto maybe_max_guesses = max_guesses_string.template to_uint();
+ auto maybe_max_guesses = AK::StringUtils::convert_to_uint(max_guesses_string);
if (!maybe_max_guesses.has_value() || maybe_max_guesses.value() < 1 || maybe_max_guesses.value() > 20) {
GUI::MessageBox::show(window, "Please enter a number between 1 and 20."sv, "MasterWord"sv);
return;