Skip to content

Commit 1ca3fbd

Browse files
committed
Added virtual destructor for Development Card
1 parent 6136cdd commit 1ca3fbd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/DevelopmentCard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DevelopmentCard {
2525
DevCardType type;
2626
public:
2727
DevelopmentCard(Player* player);
28-
// virtual ~DevelopmentCard();
28+
virtual ~DevelopmentCard();
2929

3030
virtual DevCardType getType() = 0;
3131
virtual void playCard() = 0;

src/DevelopmentCard.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ DevelopmentCard::DevelopmentCard(Player* player):owner(player)
1616

1717
}
1818

19-
20-
19+
DevelopmentCard::~DevelopmentCard() {
20+
21+
}
2122

2223
KnightCard::KnightCard(Player* player):DevelopmentCard(player)
2324
{

0 commit comments

Comments
 (0)