1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibCards+Games: Make CardGame::add_stack() fallible

And while we're at it, handle the CardStack allocation (and failure
thereof) internally.
This commit is contained in:
Sam Atkins 2023-01-05 17:24:27 +00:00 committed by Linus Groh
parent 08ff87b3ce
commit d7ba577c90
4 changed files with 24 additions and 23 deletions

View file

@ -33,11 +33,6 @@ CardGame::CardGame()
set_background_color(background_color.value_or(Color::from_rgb(0x008000)));
}
void CardGame::add_stack(NonnullRefPtr<CardStack> stack)
{
m_stacks.append(move(stack));
}
void CardGame::mark_intersecting_stacks_dirty(Cards::Card const& intersecting_card)
{
for (auto& stack : stacks()) {