mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33:57 -07:00
restore copy constructor
This commit is contained in:
parent
a4e2d43cb6
commit
f391311489
2 changed files with 9 additions and 4 deletions
|
|
@ -87,6 +87,12 @@ DeckList::DeckList()
|
|||
root = new InnerDecklistNode;
|
||||
}
|
||||
|
||||
DeckList::DeckList(const DeckList &other)
|
||||
: metadata(other.metadata), sideboardPlans(other.sideboardPlans), root(new InnerDecklistNode(other.getRoot())),
|
||||
cachedDeckHash(other.cachedDeckHash)
|
||||
{
|
||||
}
|
||||
|
||||
DeckList::DeckList(const QString &nativeString)
|
||||
{
|
||||
root = new InnerDecklistNode;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
* @brief Represents a complete deck, including metadata, zones, cards,
|
||||
* and sideboard plans.
|
||||
*
|
||||
* A DeckList is a QObject wrapper around an `InnerDecklistNode` tree,
|
||||
* A DeckList is a wrapper around an `InnerDecklistNode` tree,
|
||||
* enriched with metadata like deck name, comments, tags, banner card,
|
||||
* and multiple sideboard plans.
|
||||
*
|
||||
|
|
@ -211,9 +211,8 @@ protected:
|
|||
public:
|
||||
/// @brief Construct an empty deck.
|
||||
explicit DeckList();
|
||||
/// @brief Delete copy constructor.
|
||||
DeckList(const DeckList &) = delete;
|
||||
DeckList &operator=(const DeckList &) = delete;
|
||||
/// @brief Copy constructor (deep copies the node tree)
|
||||
DeckList(const DeckList &other);
|
||||
/// @brief Construct from a serialized native-format string.
|
||||
explicit DeckList(const QString &nativeString);
|
||||
virtual ~DeckList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue