From 6e19da12c308814d2fed19a72f874cf356f78938 Mon Sep 17 00:00:00 2001 From: Darragh Coy Date: Thu, 27 Mar 2014 11:59:07 -0700 Subject: [PATCH] Review feedback: Remove unnecessary check of EventListener::getSceneGraphPriority() for fixed event listeners. Fixed priority event listeners never have an associated node. --- cocos/2d/CCEventDispatcher.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index 159112e374..d10ef8db09 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -464,16 +464,6 @@ void EventDispatcher::debugCheckNodeHasNoEventListenersOnDestruction(Node* node) if (eventListenerVector) { - if (eventListenerVector->getFixedPriorityListeners()) - { - for (EventListener * listener : *eventListenerVector->getFixedPriorityListeners()) - { - CCASSERT(!listener || - listener->getSceneGraphPriority() != node, - "Node should have no event listeners registered for it upon destruction!"); - } - } - if (eventListenerVector->getSceneGraphPriorityListeners()) { for (EventListener * listener : *eventListenerVector->getSceneGraphPriorityListeners())