diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-21 22:44:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-21 23:18:20 +0300 |
commit | 62ffd2023d9073e452fe2e2f50cf6b2f11224d6f (patch) | |
tree | 8c45c7c16b0c20ac6a7b722d69c148149e6b651f /src/gui/inventorywindow.cpp | |
parent | cfa5391c1be51ef49380e398a72c813255d6316e (diff) | |
download | mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.gz mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.bz2 mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.xz mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.zip |
next code style changes.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r-- | src/gui/inventorywindow.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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<int>(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<int>(Input::KEY_MOD))); const bool mod2 = (tradeWindow && tradeWindow->isVisible() - && inputManager.isActionActive(Input::KEY_MOD)); + && inputManager.isActionActive(static_cast<int>(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<KeyEvent*>(&event)->getActionId() == Input::KEY_GUI_MOD) + if (static_cast<KeyEvent*>(&event)->getActionId() + == static_cast<int>(Input::KEY_GUI_MOD)) + { mSplit = true; + } } void InventoryWindow::keyReleased(gcn::KeyEvent &event) { - if (static_cast<KeyEvent*>(&event)->getActionId() == Input::KEY_GUI_MOD) + if (static_cast<KeyEvent*>(&event)->getActionId() + == static_cast<int>(Input::KEY_GUI_MOD)) + { mSplit = false; + } } void InventoryWindow::valueChanged(const gcn::SelectionEvent &event A_UNUSED) |