diff options
Diffstat (limited to 'frontend/Player.cpp')
-rw-r--r-- | frontend/Player.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/frontend/Player.cpp b/frontend/Player.cpp index d9974f7..c579f83 100644 --- a/frontend/Player.cpp +++ b/frontend/Player.cpp @@ -6,12 +6,6 @@ using namespace std; -static string argv_pop(vector<string> & argv) { - string el = argv.front(); - argv.erase(argv.begin()); - return el; -} - Player::Player(Dungeon & dungeon) : dungeon(dungeon), location(*dungeon.get_start_location()) @@ -41,9 +35,9 @@ void Player::cmdset_death() { this->cmds["Opnieuw"] = &Player::cmd_restart; } -FollowupAction Player::cmd(Argv argv) { +FollowupAction Player::cmd(string & argv) { if (argv.size() == 0) return FollowupAction::NONE; - string cmd = str_title(argv_pop(argv)); + string cmd = str_title(str_consume_arg(argv)); if (this->cmds.contains(cmd)) return (this->*cmds.at(cmd))(argv); |