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

Method removeScriptPath

library/Core.cpp:479–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479bool Core::removeScriptPath(std::filesystem::path path)
480{
481 std::lock_guard<std::mutex> lock(script_path_mutex);
482 bool found = false;
483 for (int i = 0; i < 2; i++)
484 {
485 auto &vec = script_paths[i];
486 while (1)
487 {
488 auto it = std::find(vec.begin(), vec.end(), path);
489 if (it == vec.end())
490 break;
491 vec.erase(it);
492 found = true;
493 }
494 }
495 return found;
496}
497
498void Core::getScriptPaths(std::vector<std::filesystem::path> *dest)
499{

Callers 1

Calls 4

findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected