MCPcopy Create free account
hub / github.com/crawl/crawl / command_to_keys

Function command_to_keys

crawl-ref/source/macro.cc:2215–2227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2213}
2214
2215vector<int> command_to_keys(command_type cmd)
2216{
2217 KeymapContext context = context_for_command(cmd);
2218 vector<int> result;
2219
2220 if (context == KMC_NONE)
2221 return result;
2222
2223 for (auto pair : _cmds_to_keys[context])
2224 if (pair.first == cmd)
2225 result.push_back(pair.second);
2226 return result;
2227}
2228
2229KeymapContext context_for_command(command_type cmd)
2230{

Callers 1

Calls 2

context_for_commandFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected