Skip to content

Commit

Permalink
Make ActionKey constructor explicit, fix bad cast
Browse files Browse the repository at this point in the history
Fixes: bug #795
  • Loading branch information
Eli2 committed Jul 7, 2016
1 parent 7f50e71 commit 3cbf448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/ArxGame.cpp
Expand Up @@ -1647,7 +1647,7 @@ void ArxGame::updateInput() {
GInput->update();

// Handle double clicks.
const ActionKey & button = config.actions[CONTROLS_CUST_ACTION].key[0];
const ActionKey & button = config.actions[CONTROLS_CUST_ACTION];
if((button.key[0] != -1 && (button.key[0] & Mouse::ButtonBase)
&& GInput->getMouseButtonDoubleClick(button.key[0], 300))
|| (button.key[1] != -1 && (button.key[1] & Mouse::ButtonBase)
Expand Down
2 changes: 1 addition & 1 deletion src/core/Config.h
Expand Up @@ -88,7 +88,7 @@ enum UIScaleFilter {

struct ActionKey {

ActionKey(InputKeyId key_0 = -1, InputKeyId key_1 = -1) {
explicit ActionKey(InputKeyId key_0 = -1, InputKeyId key_1 = -1) {
key[0] = key_0;
key[1] = key_1;
}
Expand Down

0 comments on commit 3cbf448

Please sign in to comment.