| 229 | } |
| 230 | |
| 231 | void operator+=(IDelegate* _delegate) |
| 232 | { |
| 233 | if (!_delegate) |
| 234 | return; |
| 235 | auto found = std::find_if( |
| 236 | mListDelegates.begin(), |
| 237 | mListDelegates.end(), |
| 238 | [=](const auto& delegate) { return delegate && delegate->compare(_delegate); }); |
| 239 | if (found != mListDelegates.end()) |
| 240 | MYGUI_EXCEPT("Trying to add same delegate twice."); |
| 241 | mListDelegates.emplace_back(_delegate); |
| 242 | } |
| 243 | |
| 244 | void operator-=(IDelegate* _delegate) |
| 245 | { |