Skip to content

Commit

Permalink
Got rid of destructors in item derived classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff591 committed Nov 27, 2021
1 parent a8b8c95 commit 6cc92c9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions Armor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class Armor : public Item
int defense;
public:
Armor(){}
~Armor()
{
delete this;
}
int get_sell_price(){return sell_price;}
string get_armor_name(){return name;}
string get_armor_description(){return description;}
Expand Down
4 changes: 0 additions & 4 deletions Potion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ class Potion : public Item
string type;
public:
Potion(){}
~Potion()
{
delete this;
}
int get_sell_price(){return sell_price;}
string get_potion_name(){return name;}
string get_potion_description(){return description;}
Expand Down
4 changes: 0 additions & 4 deletions Weapon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class Weapon : public Item
int attack;
public:
Weapon(){}
~Weapon()
{
delete this;
}
int get_sell_price(){return sell_price;}
string get_weapon_name(){return name;}
string get_weapon_description(){return description;}
Expand Down

0 comments on commit 6cc92c9

Please sign in to comment.