mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 20:33:58 -07:00
make node getter return const lists
This commit is contained in:
parent
1f30e8cfc8
commit
762dd8d85a
10 changed files with 17 additions and 17 deletions
|
|
@ -544,9 +544,9 @@ QList<CardRef> DeckList::getCardRefList() const
|
|||
return result;
|
||||
}
|
||||
|
||||
QList<DecklistCardNode *> DeckList::getCardNodes(const QStringList &restrictToZones) const
|
||||
QList<const DecklistCardNode *> DeckList::getCardNodes(const QStringList &restrictToZones) const
|
||||
{
|
||||
QList<DecklistCardNode *> result;
|
||||
QList<const DecklistCardNode *> result;
|
||||
|
||||
auto zoneNodes = getZoneNodes();
|
||||
for (auto *zoneNode : zoneNodes) {
|
||||
|
|
@ -564,9 +564,9 @@ QList<DecklistCardNode *> DeckList::getCardNodes(const QStringList &restrictToZo
|
|||
return result;
|
||||
}
|
||||
|
||||
QList<InnerDecklistNode *> DeckList::getZoneNodes() const
|
||||
QList<const InnerDecklistNode *> DeckList::getZoneNodes() const
|
||||
{
|
||||
QList<InnerDecklistNode *> zones;
|
||||
QList<const InnerDecklistNode *> zones;
|
||||
for (auto *node : *root) {
|
||||
InnerDecklistNode *currentZone = dynamic_cast<InnerDecklistNode *>(node);
|
||||
if (!currentZone)
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@ public:
|
|||
}
|
||||
QStringList getCardList() const;
|
||||
QList<CardRef> getCardRefList() const;
|
||||
QList<DecklistCardNode *> getCardNodes(const QStringList &restrictToZones = QStringList()) const;
|
||||
QList<InnerDecklistNode *> getZoneNodes() const;
|
||||
QList<const DecklistCardNode *> getCardNodes(const QStringList &restrictToZones = QStringList()) const;
|
||||
QList<const InnerDecklistNode *> getZoneNodes() const;
|
||||
int getSideboardSize() const;
|
||||
InnerDecklistNode *getRoot() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue