Skip to content

Commit

Permalink
fix: narrowing conversion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhold committed Aug 31, 2024
1 parent e30b028 commit 40610d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulator/tetrion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void ObpfTetrion::process_keys(KeyState const key_state) {
* 4. soft drop
* 5. hard drop */
auto const is_key_pressed = [&pressed_keys](Key const key) {
return pressed_keys.at(std::to_underlying(key));
return pressed_keys.at(gsl::narrow<std::size_t>(std::to_underlying(key)));
};
auto const hold_pressed = is_key_pressed(Key::Hold);
if (hold_pressed) {
Expand Down

0 comments on commit 40610d9

Please sign in to comment.