summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/inventorywindow.cpp1
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h1
5 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index a9a096d73..f5243a09b 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -278,7 +278,6 @@ InventoryWindow::~InventoryWindow()
mSortDropDown->hideDrop(false);
delete mSortModel;
mSortModel = nullptr;
- //delete mTextPopup;
mTextPopup = nullptr;
}
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 20c8b9052..10a1b7b8d 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -452,7 +452,7 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event)
}
}
-void ItemContainer::mouseDragged(gcn::MouseEvent &event)
+void ItemContainer::mouseDragged(gcn::MouseEvent &event A_UNUSED)
{
if (mSelectionStatus != SEL_NONE)
mSelectionStatus = SEL_DRAGGING;
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 6516b056f..e6cbdae4e 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -145,7 +145,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
width, mRowHeight));
}
- if (mShopItems)
+ if (mShopItems && item)
{
Image *const icon = item->getImage();
if (icon)
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 436f0c583..afd4e14f4 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -47,7 +47,6 @@
SpellShortcutContainer::SpellShortcutContainer(const unsigned number) :
ShortcutContainer(),
- mSpellMoved(nullptr),
mSpellPopup(new SpellPopup),
mNumber(number),
mForegroundColor2(getThemeColor(Theme::TEXT_OUTLINE)),
@@ -239,7 +238,6 @@ void SpellShortcutContainer::mouseReleased(gcn::MouseEvent &event)
if (dragDrop.getSource() == DRAGDROP_SOURCE_SPELLS)
{
const int oldIndex = dragDrop.getTag();
- const int oldItemId = getItemByIndex(oldIndex);
const int idx = mNumber * SPELL_SHORTCUT_ITEMS;
if (spellManager)
{
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index 509b96c61..57f5b4a13 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -82,7 +82,6 @@ class SpellShortcutContainer final : public ShortcutContainer
int getItemByIndex(const int index);
private:
- TextCommand *mSpellMoved;
SpellPopup *mSpellPopup;
unsigned int mNumber;
gcn::Color mForegroundColor2;