Skip to content

Commit

Permalink
Make ActionKey constructor explicit, fix bad cast\n\nFixes: bug #795
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli2 committed Jul 7, 2016
1 parent 7f50e71 commit d27437d
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d27437d

Please sign in to comment.