MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / removeModule_NoLock

Method removeModule_NoLock

src/override/Engine.cpp:824–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822
823
824void Engine::removeModule_NoLock(Module* module) {
825 DISTRHO_SAFE_ASSERT_RETURN(module,);
826 // Check that the module actually exists
827 if (TerminalModule* const terminalModule = asTerminalModule(module)) {
828 auto tit = std::find(internal->terminalModules.begin(), internal->terminalModules.end(), terminalModule);
829 DISTRHO_SAFE_ASSERT_RETURN(tit != internal->terminalModules.end(),);
830 removeModule_NoLock_common(internal, module);
831 internal->terminalModules.erase(tit);
832 }
833 else {
834 auto it = std::find(internal->modules.begin(), internal->modules.end(), module);
835 DISTRHO_SAFE_ASSERT_RETURN(it != internal->modules.end(),);
836 removeModule_NoLock_common(internal, module);
837 internal->modules.erase(it);
838 }
839}
840
841
842bool Engine::hasModule(Module* module) {

Callers

nothing calls this directly

Calls 6

asTerminalModuleFunction · 0.85
findFunction · 0.85
eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected