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

@ -30,11 +30,14 @@ game_command console_input::get_command() {
auto tmp = get_direction(cmd);
if (cmdtmp == "u")
return (game_command)(tmp + apply_north);
return static_cast<game_command>
(tmp + apply_north);
else if (cmdtmp == "a")
return (game_command)(tmp + attack_north);
return static_cast<game_command>
(tmp + attack_north);
else
return (game_command)(tmp + throw_north);
return static_cast<game_command>
(tmp + throw_north);
} else if (cmd == "yes") {
return game_command::enter;
} else if (cmd == "i") {
@ -43,7 +46,8 @@ game_command console_input::get_command() {
auto tmp = get_direction(cmd);
if (tmp != game_command_panic)
return (game_command)(tmp + move_north);
return static_cast<game_command>
(tmp + move_north);
}
return game_command_pass;