| 1115 | |
| 1116 | |
| 1117 | void Engine::addParamHandle(ParamHandle* paramHandle) { |
| 1118 | std::lock_guard<SharedMutex> lock(internal->mutex); |
| 1119 | // New ParamHandles must be blank. |
| 1120 | // This means we don't have to refresh the cache. |
| 1121 | DISTRHO_SAFE_ASSERT_RETURN(paramHandle->moduleId < 0,); |
| 1122 | |
| 1123 | // Check that the ParamHandle is not already added |
| 1124 | auto it = internal->paramHandles.find(paramHandle); |
| 1125 | DISTRHO_SAFE_ASSERT_RETURN(it == internal->paramHandles.end(),); |
| 1126 | |
| 1127 | // Add it |
| 1128 | internal->paramHandles.insert(paramHandle); |
| 1129 | // No need to refresh the cache because the moduleId is not set. |
| 1130 | } |
| 1131 | |
| 1132 | |
| 1133 | void Engine::removeParamHandle(ParamHandle* paramHandle) { |
no test coverage detected