diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-20 12:45:02 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-22 21:31:36 +0000 |
commit | 8b3a94ffbc43d55b48a6038253f96d66838c4da1 (patch) | |
tree | 5a4992f58c4ddf17f9733e4b573369788373695b /Userland/Libraries/LibCards/CardStack.h | |
parent | 83687f85df7fd1b454fecee27699c445568b18f3 (diff) | |
download | serenity-8b3a94ffbc43d55b48a6038253f96d66838c4da1.zip |
LibCards+Games+GamesSettings: Return ErrorOr from CardStack::push()
Very few of these calls can propagate their errors yet, but one step at
a time. :^)
Diffstat (limited to 'Userland/Libraries/LibCards/CardStack.h')
-rw-r--r-- | Userland/Libraries/LibCards/CardStack.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCards/CardStack.h b/Userland/Libraries/LibCards/CardStack.h index 276b17835f..7fb164371b 100644 --- a/Userland/Libraries/LibCards/CardStack.h +++ b/Userland/Libraries/LibCards/CardStack.h @@ -43,9 +43,9 @@ public: bool make_top_card_visible(); // Returns true if the card was flipped. - void push(NonnullRefPtr<Card> card); + ErrorOr<void> push(NonnullRefPtr<Card>); NonnullRefPtr<Card> pop(); - void take_all(CardStack&); + ErrorOr<void> take_all(CardStack&); void rebound_cards(); bool is_allowed_to_push(Card const&, size_t stack_size = 1, MovementRule movement_rule = MovementRule::Alternating) const; |