mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -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;
|
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)
|
DeckList::DeckList(const QString &nativeString)
|
||||||
{
|
{
|
||||||
root = new InnerDecklistNode;
|
root = new InnerDecklistNode;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public:
|
||||||
* @brief Represents a complete deck, including metadata, zones, cards,
|
* @brief Represents a complete deck, including metadata, zones, cards,
|
||||||
* and sideboard plans.
|
* 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,
|
* enriched with metadata like deck name, comments, tags, banner card,
|
||||||
* and multiple sideboard plans.
|
* and multiple sideboard plans.
|
||||||
*
|
*
|
||||||
|
|
@ -211,9 +211,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
/// @brief Construct an empty deck.
|
/// @brief Construct an empty deck.
|
||||||
explicit DeckList();
|
explicit DeckList();
|
||||||
/// @brief Delete copy constructor.
|
/// @brief Copy constructor (deep copies the node tree)
|
||||||
DeckList(const DeckList &) = delete;
|
DeckList(const DeckList &other);
|
||||||
DeckList &operator=(const DeckList &) = delete;
|
|
||||||
/// @brief Construct from a serialized native-format string.
|
/// @brief Construct from a serialized native-format string.
|
||||||
explicit DeckList(const QString &nativeString);
|
explicit DeckList(const QString &nativeString);
|
||||||
virtual ~DeckList();
|
virtual ~DeckList();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue