mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33:57 -07:00
remove unnecessary virtual methods
This commit is contained in:
parent
87edc756c9
commit
8d088f8677
2 changed files with 1 additions and 27 deletions
|
|
@ -449,11 +449,8 @@ bool DeckList::loadFromStream_Plain(QTextStream &in, bool preserveMetadata)
|
|||
cardName.replace(diff.key(), diff.value());
|
||||
}
|
||||
|
||||
// Resolve complete card name, this function does nothing if the name is not found
|
||||
cardName = getCompleteCardName(cardName);
|
||||
|
||||
// Determine the zone (mainboard/sideboard)
|
||||
QString zoneName = getCardZoneFromName(cardName, sideboard ? DECK_ZONE_SIDE : DECK_ZONE_MAIN);
|
||||
QString zoneName = sideboard ? DECK_ZONE_SIDE : DECK_ZONE_MAIN;
|
||||
|
||||
// make new entry in decklist
|
||||
new DecklistCardNode(cardName, amount, getZoneObjFromName(zoneName), -1, setCode, collectorNumber);
|
||||
|
|
|
|||
|
|
@ -153,29 +153,6 @@ private:
|
|||
InnerDecklistNode *getZoneObjFromName(const QString &zoneName);
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Map a card name to its zone.
|
||||
* Override in subclasses for format-specific logic.
|
||||
* @param cardName Card being placed.
|
||||
* @param currentZoneName Zone candidate.
|
||||
* @return Zone name to use.
|
||||
*/
|
||||
virtual QString getCardZoneFromName(const QString /*cardName*/, QString currentZoneName)
|
||||
{
|
||||
return currentZoneName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Produce the complete display name of a card.
|
||||
* Override in subclasses to add set suffixes or annotations.
|
||||
* @param cardName Base name.
|
||||
* @return Full display name.
|
||||
*/
|
||||
virtual QString getCompleteCardName(const QString &cardName) const
|
||||
{
|
||||
return cardName;
|
||||
}
|
||||
|
||||
/// @name Metadata setters
|
||||
///@{
|
||||
void setName(const QString &_name = QString())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue