From 5440f5662f76fc8803491ca00a92556e10201919 Mon Sep 17 00:00:00 2001 From: Ming Date: Tue, 31 Aug 2010 09:04:20 +0000 Subject: [PATCH] issue #85:remove the using of dynamic_cast() --- test_uphone/tests/MotionStreakTest/MotionStreakTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_uphone/tests/MotionStreakTest/MotionStreakTest.cpp b/test_uphone/tests/MotionStreakTest/MotionStreakTest.cpp index 75d06f418c..3306c32b68 100644 --- a/test_uphone/tests/MotionStreakTest/MotionStreakTest.cpp +++ b/test_uphone/tests/MotionStreakTest/MotionStreakTest.cpp @@ -33,7 +33,7 @@ void MotionStreakTest1::onEnter() CCAction* action1 = CCRepeatForever::actionWithAction(a1); CCIntervalAction* motion = CCMoveBy::actionWithDuration(2, CGPointMake(100,0) ); - m_root->runAction( CCRepeatForever::actionWithAction( dynamic_cast(CCSequence::actions(motion, motion->reverse(), NULL)) ) ); + m_root->runAction( CCRepeatForever::actionWithAction((CCIntervalAction*)(CCSequence::actions(motion, motion->reverse(), NULL)) ) ); m_root->runAction( action1 ); } @@ -71,7 +71,7 @@ void MotionStreakTest2::onEnter() void MotionStreakTest2::ccTouchesMoved(NSSet* touches, UIEvent* event) { NSSetIterator it = touches->begin(); - CCTouch* touch = dynamic_cast(*it); + CCTouch* touch = (CCTouch*)(*it); CGPoint touchLocation = touch->locationInView( touch->view() ); touchLocation = CCDirector::getSharedDirector()->convertToGL( touchLocation );