Skip to content

Commit

Permalink
remove unused 'assert_existence' function
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jul 19, 2017
1 parent ecb5102 commit 4c1976d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/map_command_handler.hpp
Expand Up @@ -360,17 +360,13 @@ class map_command_handler
r.first->second = c;
}
}
virtual void assert_existence(const std::string& cmd) {
assert(command_map_.count(cmd));
}

virtual void register_alias(const std::string& to_cmd,
const std::string& cmd)
{
// disable the assert to allow alias to "command + args"
// the fonction assert_existence seems unused now
//assert_existence(to_cmd);
command_alias_map_[cmd] = to_cmd;
}

//get all aliases of a command.
static const std::vector<std::string> get_aliases(const std::string& cmd)
{
Expand Down
5 changes: 0 additions & 5 deletions src/menu_events.cpp
Expand Up @@ -1041,11 +1041,6 @@ class console_handler : public map_command_handler<console_handler>, private cha
chmap::register_command(cmd, h, help, usage, flags + "N"); // add chat commands as network_only
}

virtual void assert_existence(const std::string& cmd)
{
chmap::assert_existence(cmd);
}

virtual void register_alias(const std::string& to_cmd, const std::string& cmd)
{
chmap::register_alias(to_cmd, cmd);
Expand Down

0 comments on commit 4c1976d

Please sign in to comment.