From dd7ac44927b3d1d1cd40360cf3d7cc204e182151 Mon Sep 17 00:00:00 2001 From: AI-scor <354880559+AI-scor@users.noreply.github.com> Date: Wed, 11 Nov 2026 02:18:51 +0100 Subject: [PATCH] docs: document ownership in Server_Card::setStashedCard --- .../libcockatrice/network/server/remote/game/server_card.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.h b/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.h index cffd9eb40..48a29bc32 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.h +++ b/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.h @@ -215,6 +215,12 @@ public: { attachedCards.removeOne(card); } + /** + * @brief Stashes @p card inside this card, taking ownership of it: it is deleted with this + * card unless the caller takes it back with takeStashedCard(). + * @note A token is never stashed — if @p card would be destroyed on zone change, its own + * stashed card (if any) is kept in its place and @p card is deleted during the call. + */ void setStashedCard(Server_Card *card) { // setStashedCard should only be called on creation of a new card, so