summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-28 23:29:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-28 23:29:59 +0300
commitcfbb335f67a350cf23adb62ee536330312185f58 (patch)
tree211ff744893883ff6dd93bd49138fc97a47673cc /src/gui
parentb2e94802333247f64369c1164215d26583abda20 (diff)
downloadmv-cfbb335f67a350cf23adb62ee536330312185f58.tar.gz
mv-cfbb335f67a350cf23adb62ee536330312185f58.tar.bz2
mv-cfbb335f67a350cf23adb62ee536330312185f58.tar.xz
mv-cfbb335f67a350cf23adb62ee536330312185f58.zip
Remove some ueseless checks.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/equipmentwindow.cpp5
-rw-r--r--src/gui/windows/inventorywindow.cpp2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index ef060ec83..784a7d86c 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -712,11 +712,8 @@ void EquipmentWindow::loadSlot(const XmlNodePtr slotNode,
const int imageIndex = XML::getProperty(slotNode, "image", -1);
Image *image = nullptr;
- if (imageset && imageIndex >= 0 && imageIndex
- < static_cast<signed>(imageset->size()))
- {
+ if (imageIndex >= 0 && imageIndex < static_cast<signed>(imageset->size()))
image = imageset->get(imageIndex);
- }
std::vector<EquipmentBox*> &boxes = mPages[page]->boxes;
if (boxes[slot])
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index a57565d7f..d4f27fd74 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -327,7 +327,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
invInstances.push_back(this);
- if (inventory && inventory->isMainInventory())
+ if (inventory->isMainInventory())
{
updateDropButton();
}