summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 92b21dfd1..c2a4b4636 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -59,6 +59,8 @@
#include "net/inventoryhandler.h"
#include "net/net.h"
+#include "utils/delete2.h"
+
#include <string>
#include "debug.h"
@@ -98,8 +100,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mCompactMode(false)
{
mTextPopup->postInit();
- mSlotsBar->setColor(Theme::getThemeColor(Theme::SLOTS_BAR),
- Theme::getThemeColor(Theme::SLOTS_BAR_OUTLINE));
+ mSlotsBar->setColor(getThemeColor(Theme::SLOTS_BAR),
+ getThemeColor(Theme::SLOTS_BAR_OUTLINE));
if (inventory)
{
@@ -194,8 +196,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mEquipmentButton = new Button(this, _("Equipment"), "equipment", this);
mWeightBar = new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
- mWeightBar->setColor(Theme::getThemeColor(Theme::WEIGHT_BAR),
- Theme::getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
+ mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
+ getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
place(0, 0, mWeightBar, 4);
mSlotsBarCell = &place(4, 0, mSlotsBar, 5);
@@ -274,8 +276,7 @@ InventoryWindow::~InventoryWindow()
invInstances.front()->updateDropButton();
mSortDropDown->hideDrop(false);
- delete mSortModel;
- mSortModel = nullptr;
+ delete2(mSortModel);
mTextPopup = nullptr;
}