| 242 | } |
| 243 | |
| 244 | void operator-=(IDelegate* _delegate) |
| 245 | { |
| 246 | if (!_delegate) |
| 247 | return; |
| 248 | auto found = std::find_if( |
| 249 | mListDelegates.begin(), |
| 250 | mListDelegates.end(), |
| 251 | [=](const auto& delegate) { return delegate && delegate->compare(_delegate); }); |
| 252 | if (found != mListDelegates.end()) |
| 253 | { |
| 254 | if (found->get() == _delegate) |
| 255 | _delegate = nullptr; |
| 256 | found->reset(); |
| 257 | } |
| 258 | delete _delegate; |
| 259 | } |
| 260 | |
| 261 | void operator()(Args... args) const |
| 262 | { |