removed all C-style casts

This commit is contained in:
2024-07-18 17:56:00 -04:00
parent 8f00e903e8
commit 1a9c04ad5a
36 changed files with 212 additions and 92 deletions

View File

@ -68,28 +68,36 @@ game_command curses_input::get_command() {
switch (curse->getcmd()) {
case 'h':
return (game_command)(tmp + west);
return static_cast<game_command>
(tmp + west);
case 'j':
return (game_command)(tmp + south);
return static_cast<game_command>
(tmp + south);
case 'k':
return (game_command)(tmp + north);
return static_cast<game_command>
(tmp + north);
case 'l':
return (game_command)(tmp + east);
return static_cast<game_command>
(tmp + east);
case 'y':
return (game_command)(tmp + northwest);
return static_cast<game_command>
(tmp + northwest);
case 'u':
return (game_command)(tmp + northeast);
return static_cast<game_command>
(tmp + northeast);
case 'b':
return (game_command)(tmp + southwest);
return static_cast<game_command>
(tmp + southwest);
case 'n':
return (game_command)(tmp + southeast);
return static_cast<game_command>
(tmp + southeast);
default:
return game_command_panic;