| 1150 | |
| 1151 | |
| 1152 | void Engine::addParamHandle(ParamHandle* paramHandle) { |
| 1153 | std::lock_guard<SharedMutex> lock(internal->mutex); |
| 1154 | // New ParamHandles must be blank. |
| 1155 | // This means we don't have to refresh the cache. |
| 1156 | assert(paramHandle->moduleId < 0); |
| 1157 | |
| 1158 | // Check that the ParamHandle is not already added |
| 1159 | auto it = internal->paramHandles.find(paramHandle); |
| 1160 | assert(it == internal->paramHandles.end()); |
| 1161 | |
| 1162 | // Add it |
| 1163 | internal->paramHandles.insert(paramHandle); |
| 1164 | // No need to refresh the cache because the moduleId is not set. |
| 1165 | } |
| 1166 | |
| 1167 | |
| 1168 | void Engine::removeParamHandle(ParamHandle* paramHandle) { |