| 115 | |
| 116 | template <typename Function> |
| 117 | void TryForEachAndRemoveFailed(std::list<std::unique_ptr<CZMQAbstractNotifier>>& notifiers, const Function& func) |
| 118 | { |
| 119 | for (auto i = notifiers.begin(); i != notifiers.end(); ) { |
| 120 | CZMQAbstractNotifier* notifier = i->get(); |
| 121 | if (func(notifier)) { |
| 122 | ++i; |
| 123 | } else { |
| 124 | notifier->Shutdown(); |
| 125 | i = notifiers.erase(i); |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | } // anonymous namespace |
| 131 |
no test coverage detected