| 822 | |
| 823 | |
| 824 | void 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 | |
| 842 | bool Engine::hasModule(Module* module) { |
nothing calls this directly
no test coverage detected