mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:17:45 +00:00
LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr
clang-format sure has some interesting opinions about where to put a method call that comes after a lambda. :thonk:
This commit is contained in:
parent
a15d44f019
commit
a8cf0c9371
20 changed files with 42 additions and 36 deletions
|
@ -28,7 +28,7 @@ Game::Game()
|
|||
m_delay_timer = Core::Timer::create_single_shot(0, [this] {
|
||||
dbgln_if(HEARTS_DEBUG, "Continuing game after delay...");
|
||||
advance_game();
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
constexpr int card_overlap = 20;
|
||||
constexpr int outer_border_size = 15;
|
||||
|
@ -155,7 +155,7 @@ void Game::show_score_card(bool game_over)
|
|||
if (!m_players[0].is_human) {
|
||||
close_timer = Core::Timer::create_single_shot(2000, [&] {
|
||||
score_dialog->close();
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
close_timer->start();
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ void Game::start_animation(NonnullRefPtrVector<Card> cards, Gfx::IntPoint end, F
|
|||
m_animation_delay_timer = Core::Timer::create_single_shot(initial_delay_ms, [&] {
|
||||
m_animation_playing = true;
|
||||
start_timer(10);
|
||||
});
|
||||
}).release_value_but_fixme_should_propagate_errors();
|
||||
m_animation_delay_timer->start();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ REGISTER_WIDGET(MasterWord, WordGame)
|
|||
namespace MasterWord {
|
||||
|
||||
WordGame::WordGame()
|
||||
: m_clear_message_timer(Core::Timer::create_single_shot(5000, [this] { clear_message(); }))
|
||||
: m_clear_message_timer(Core::Timer::create_single_shot(5000, [this] { clear_message(); }).release_value_but_fixme_should_propagate_errors())
|
||||
{
|
||||
read_words();
|
||||
m_num_letters = Config::read_i32("MasterWord"sv, ""sv, "word_length"sv, 5);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue