From 9247c5a23757e01ef7ee91dd5655fcab177e5e6d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Mar 2014 13:51:57 +0300 Subject: fix code style. --- src/gui/windows/inventorywindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gui/windows/inventorywindow.cpp') diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index a12dca882..92b21dfd1 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -59,8 +59,6 @@ #include "net/inventoryhandler.h" #include "net/net.h" -#include "utils/gettext.h" - #include #include "debug.h" @@ -281,7 +279,7 @@ InventoryWindow::~InventoryWindow() mTextPopup = nullptr; } -void InventoryWindow::storeSortOrder() +void InventoryWindow::storeSortOrder() const { if (mInventory) { @@ -669,7 +667,8 @@ void InventoryWindow::updateButtons(const Item *item) void InventoryWindow::setSplitAllowed(const bool allowed) { - mSplitButton->setVisible(allowed); + if (mSplitButton) + mSplitButton->setVisible(allowed); } void InventoryWindow::close() @@ -699,7 +698,7 @@ void InventoryWindow::processEvent(const Channels channel A_UNUSED, void InventoryWindow::updateWeight() { - if (!isMainInventory()) + if (!isMainInventory() || !mWeightBar) return; const int total = PlayerInfo::getAttribute(PlayerInfo::TOTAL_WEIGHT); -- cgit v1.2.3-60-g2f50