summaryrefslogtreecommitdiff
path: root/src/beingequipbackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/beingequipbackend.cpp')
-rw-r--r--src/beingequipbackend.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/beingequipbackend.cpp b/src/beingequipbackend.cpp
index 03d882665..3f5f627a8 100644
--- a/src/beingequipbackend.cpp
+++ b/src/beingequipbackend.cpp
@@ -25,6 +25,8 @@
#include "net/inventoryhandler.h"
#include "net/net.h"
+#include "utils/delete2.h"
+
#include "debug.h"
BeingEquipBackend::BeingEquipBackend(Being *const being)
@@ -51,19 +53,13 @@ BeingEquipBackend::BeingEquipBackend(Being *const being)
BeingEquipBackend::~BeingEquipBackend()
{
for (int i = 0; i < EQUIPMENT_SIZE; i++)
- {
- delete mEquipment[i];
- mEquipment[i] = nullptr;
- }
+ delete2(mEquipment[i])
}
void BeingEquipBackend::clear()
{
for (int i = 0; i < EQUIPMENT_SIZE; i++)
- {
- delete mEquipment[i];
- mEquipment[i] = nullptr;
- }
+ delete2(mEquipment[i])
}
void BeingEquipBackend::setEquipment(const int index, Item *const item)