예제 #1
0
static void removeFirstListenerCreatedFromMarkup(EventListenerVector& listenerVector)
{
    bool foundListener = listenerVector.removeFirstMatching([] (const RegisteredEventListener& listener) {
        return listener.listener->wasCreatedFromMarkup();
    });
    ASSERT_UNUSED(foundListener, foundListener);
}
예제 #2
0
static void removeFirstListenerCreatedFromMarkup(EventListenerVector& listenerVector)
{
    bool foundListener = listenerVector.removeFirstMatching([] (const auto& registeredListener) {
        if (registeredListener->callback().wasCreatedFromMarkup()) {
            registeredListener->markAsRemoved();
            return true;
        }
        return false;
    });
    ASSERT_UNUSED(foundListener, foundListener);
}