MCPcopy Create free account
hub / github.com/DFHack/dfhack / ensureCommandHistory

Function ensureCommandHistory

library/LuaApi.cpp:1276–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1274static std::map<string, CommandHistory> commandHistories;
1275
1276static CommandHistory * ensureCommandHistory(string id,
1277 string src_file) {
1278 if (!commandHistories.count(id)) {
1279 commandHistories[id].load(src_file.c_str());
1280 }
1281 return &commandHistories[id];
1282}
1283
1284static int getCommandHistory(lua_State *state)
1285{

Callers 2

getCommandHistoryFunction · 0.85
addCommandToHistoryFunction · 0.85

Calls 3

c_strMethod · 0.80
countMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected