diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-04 18:02:33 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch) | |
tree | 372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Games/Spider | |
parent | f74251606d74b504a1379ebb893fdb5529054ea5 (diff) | |
download | serenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip |
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
Diffstat (limited to 'Userland/Games/Spider')
-rw-r--r-- | Userland/Games/Spider/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Games/Spider/main.cpp b/Userland/Games/Spider/main.cpp index 3f4ae68b41..4a1d8d8f14 100644 --- a/Userland/Games/Spider/main.cpp +++ b/Userland/Games/Spider/main.cpp @@ -29,13 +29,13 @@ enum class StatisticDisplay : u8 { __Count }; -static String format_seconds(uint64_t seconds_elapsed) +static DeprecatedString format_seconds(uint64_t seconds_elapsed) { uint64_t hours = seconds_elapsed / 3600; uint64_t minutes = (seconds_elapsed / 60) % 60; uint64_t seconds = seconds_elapsed % 60; - return String::formatted("{:02}:{:02}:{:02}", hours, minutes, seconds); + return DeprecatedString::formatted("{:02}:{:02}:{:02}", hours, minutes, seconds); } ErrorOr<int> serenity_main(Main::Arguments arguments) @@ -126,10 +126,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto reset_statistic_status = [&]() { switch (statistic_display) { case StatisticDisplay::HighScore: - statusbar.set_text(1, String::formatted("High Score: {}", high_score())); + statusbar.set_text(1, DeprecatedString::formatted("High Score: {}", high_score())); break; case StatisticDisplay::BestTime: - statusbar.set_text(1, String::formatted("Best Time: {}", format_seconds(best_time()))); + statusbar.set_text(1, DeprecatedString::formatted("Best Time: {}", format_seconds(best_time()))); break; default: VERIFY_NOT_REACHED(); @@ -152,7 +152,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) }; game.on_score_update = [&](uint32_t score) { - statusbar.set_text(0, String::formatted("Score: {}", score)); + statusbar.set_text(0, DeprecatedString::formatted("Score: {}", score)); }; uint64_t seconds_elapsed = 0; @@ -160,7 +160,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto timer = Core::Timer::create_repeating(1000, [&]() { ++seconds_elapsed; - statusbar.set_text(2, String::formatted("Time: {}", format_seconds(seconds_elapsed))); + statusbar.set_text(2, DeprecatedString::formatted("Time: {}", format_seconds(seconds_elapsed))); }); game.on_game_start = [&]() { |