mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
remove redundant static_cast by changing Events::pressedKeys template parameter from int to keycode
This commit is contained in:
parent
659a2610aa
commit
77b36f45f2
4 changed files with 5 additions and 5 deletions
|
|
@ -27,13 +27,13 @@ void key_callback(GLFWwindow*, int key, int scancode, int action, int /*mode*/)
|
|||
if (key == GLFW_KEY_UNKNOWN) return;
|
||||
if (action == GLFW_PRESS) {
|
||||
Events::setKey(key, true);
|
||||
Events::pressedKeys.push_back(key);
|
||||
Events::pressedKeys.push_back(static_cast<keycode>(key));
|
||||
}
|
||||
else if (action == GLFW_RELEASE) {
|
||||
Events::setKey(key, false);
|
||||
}
|
||||
else if (action == GLFW_REPEAT) {
|
||||
Events::pressedKeys.push_back(key);
|
||||
Events::pressedKeys.push_back(static_cast<keycode>(key));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue