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.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index ed3742c9b..c5934b7ba 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -491,8 +491,7 @@ void InventoryWindow::action(const ActionEvent &event)
if (PlayerInfo::isItemProtected(item->getId()))
return;
- if (inputManager.isActionActive(static_cast<int>(
- InputAction::STOP_ATTACK)))
+ if (inputManager.isActionActive(InputAction::STOP_ATTACK))
{
PlayerInfo::dropItem(item, item->getQuantity(), Sfx_true);
}
@@ -551,12 +550,12 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
if (clicks == 2 && gui)
gui->resetClickCount();
- const bool mod = (isStorageActive() && inputManager.isActionActive(
- static_cast<int>(InputAction::STOP_ATTACK)));
+ const bool mod = (isStorageActive() &&
+ inputManager.isActionActive(InputAction::STOP_ATTACK));
- const bool mod2 = (tradeWindow && tradeWindow->isWindowVisible()
- && inputManager.isActionActive(static_cast<int>(
- InputAction::STOP_ATTACK)));
+ const bool mod2 = (tradeWindow &&
+ tradeWindow->isWindowVisible() &&
+ inputManager.isActionActive(InputAction::STOP_ATTACK));
if (!mod && !mod2 && event.getButton() == MouseButton::RIGHT)
{
@@ -707,13 +706,13 @@ void InventoryWindow::mouseExited(MouseEvent &event A_UNUSED)
void InventoryWindow::keyPressed(KeyEvent &event)
{
- if (event.getActionId() == static_cast<int>(InputAction::GUI_MOD))
+ if (event.getActionId() == InputAction::GUI_MOD)
mSplit = true;
}
void InventoryWindow::keyReleased(KeyEvent &event)
{
- if (event.getActionId() == static_cast<int>(InputAction::GUI_MOD))
+ if (event.getActionId() == InputAction::GUI_MOD)
mSplit = false;
}