| 53 | } |
| 54 | |
| 55 | void DebugManager::unregisterCategory(DebugCategory& cat) |
| 56 | { |
| 57 | DEBUG(debug) << "unregister DebugCategory '" << cat.category() |
| 58 | << "' from '" << cat.plugin() |
| 59 | << "' allowed " << cat.allowed() << std::endl; |
| 60 | std::lock_guard<std::mutex> guard(access_mutex_); |
| 61 | auto iter = std::find(begin(), end(), &cat); |
| 62 | std::swap(*iter, back()); |
| 63 | pop_back(); |
| 64 | categorySignal(CAT_REMOVE, cat); |
| 65 | } |
| 66 | |
| 67 | DebugRegisterBase::DebugRegisterBase(DebugCategory* cat) |
| 68 | { |