Add virtual destructor to CreatureParty.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
445f7eb3d5
commit
75bce0e329
|
@ -12,7 +12,7 @@ namespace CreatureLib::Battling {
|
||||||
CreatureParty(std::vector<Creature*> party) : _party(party) {}
|
CreatureParty(std::vector<Creature*> party) : _party(party) {}
|
||||||
CreatureParty(std::initializer_list<Creature*> party) : _party(party) {}
|
CreatureParty(std::initializer_list<Creature*> party) : _party(party) {}
|
||||||
|
|
||||||
~CreatureParty() {
|
virtual ~CreatureParty() {
|
||||||
for (auto c : _party) {
|
for (auto c : _party) {
|
||||||
delete c;
|
delete c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue