MCPcopy Create free account
hub / github.com/DFHack/dfhack / operator[]

Method operator[]

library/PluginManager.cpp:1140–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1138}
1139
1140Plugin *PluginManager::operator[] (std::string name)
1141{
1142 std::lock_guard<std::recursive_mutex> lock{*plugin_mutex};
1143 if (all_plugins.find(name) == all_plugins.end())
1144 {
1145 if (Filesystem::isfile(getPluginPath(name)))
1146 addPlugin(name);
1147 }
1148 return (all_plugins.find(name) != all_plugins.end()) ? all_plugins[name] : NULL;
1149}
1150
1151size_t PluginManager::size()
1152{

Callers

nothing calls this directly

Calls 3

getPluginPathFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected