removed all C-style casts
This commit is contained in:
@ -30,11 +30,11 @@ game_command file_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 +43,8 @@ game_command file_input::get_command() {
|
||||
auto tmp = get_direction(cmd);
|
||||
|
||||
if (tmp != game_command_panic)
|
||||
return tmp;
|
||||
return static_cast<game_command>
|
||||
(tmp + move_north);
|
||||
}
|
||||
|
||||
return game_command_pass;
|
||||
|
Reference in New Issue
Block a user