From 62ffd2023d9073e452fe2e2f50cf6b2f11224d6f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Aug 2012 22:44:44 +0300 Subject: next code style changes. --- src/gui/inventorywindow.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 093ca7c24..16adbbb75 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -363,7 +363,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event) } else { - if (inputManager.isActionActive(Input::KEY_MOD)) + if (inputManager.isActionActive(static_cast(Input::KEY_MOD))) { Net::getInventoryHandler()->dropItem( item, item->getQuantity()); @@ -414,10 +414,10 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event) gui->resetClickCount(); const bool mod = (isStorageActive() && inputManager.isActionActive( - Input::KEY_MOD)); + static_cast(Input::KEY_MOD))); const bool mod2 = (tradeWindow && tradeWindow->isVisible() - && inputManager.isActionActive(Input::KEY_MOD)); + && inputManager.isActionActive(static_cast(Input::KEY_MOD))); if (!mod && !mod2 && event.getButton() == gcn::MouseEvent::RIGHT) { @@ -534,14 +534,20 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event) void InventoryWindow::keyPressed(gcn::KeyEvent &event) { - if (static_cast(&event)->getActionId() == Input::KEY_GUI_MOD) + if (static_cast(&event)->getActionId() + == static_cast(Input::KEY_GUI_MOD)) + { mSplit = true; + } } void InventoryWindow::keyReleased(gcn::KeyEvent &event) { - if (static_cast(&event)->getActionId() == Input::KEY_GUI_MOD) + if (static_cast(&event)->getActionId() + == static_cast(Input::KEY_GUI_MOD)) + { mSplit = false; + } } void InventoryWindow::valueChanged(const gcn::SelectionEvent &event A_UNUSED) -- cgit v1.2.3-60-g2f50