From 1d63bb29ba025adf7588d1a769152f8dde83348d Mon Sep 17 00:00:00 2001 From: Ming Date: Tue, 31 Aug 2010 08:54:43 +0000 Subject: [PATCH] issue #85:remove the using of dynamic_cast() --- test_uphone/tests/EffectsTest/EffectsTest.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test_uphone/tests/EffectsTest/EffectsTest.cpp b/test_uphone/tests/EffectsTest/EffectsTest.cpp index 86cc9faf01..154fae7294 100644 --- a/test_uphone/tests/EffectsTest/EffectsTest.cpp +++ b/test_uphone/tests/EffectsTest/EffectsTest.cpp @@ -63,7 +63,7 @@ public: CCIntervalAction* flipx_back = flipx->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(2); - return dynamic_cast(CCSequence::actions(flipx, delay, flipx_back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(flipx, delay, flipx_back, NULL)); } }; @@ -76,7 +76,7 @@ public: CCIntervalAction* flipy_back = flipy->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(2); - return dynamic_cast(CCSequence::actions(flipy, delay, flipy_back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(flipy, delay, flipy_back, NULL)); } }; @@ -162,7 +162,7 @@ public: CCIntervalAction* shuffle_back = shuffle->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(2); - return dynamic_cast(CCSequence::actions(shuffle, delay, shuffle_back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(shuffle, delay, shuffle_back, NULL)); } }; @@ -176,7 +176,7 @@ public: CCIntervalAction* back = fadeout->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f); - return dynamic_cast(CCSequence::actions(fadeout, delay, back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(fadeout, delay, back, NULL)); } }; @@ -190,7 +190,7 @@ public: CCIntervalAction* back = fadeout->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f); - return dynamic_cast(CCSequence::actions(fadeout, delay, back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(fadeout, delay, back, NULL)); } }; @@ -204,7 +204,7 @@ public: CCIntervalAction* back = fadeout->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f); - return dynamic_cast(CCSequence::actions(fadeout, delay, back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(fadeout, delay, back, NULL)); } }; @@ -217,7 +217,7 @@ public: CCIntervalAction* back = fadeout->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f); - return dynamic_cast(CCSequence::actions(fadeout, delay, back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(fadeout, delay, back, NULL)); } }; @@ -230,7 +230,7 @@ public: CCIntervalAction* back = fadeout->reverse(); CCDelayTime* delay = CCDelayTime::actionWithDuration(0.5f); - return dynamic_cast(CCSequence::actions(fadeout, delay, back, NULL)); + return (CCIntervalAction*)(CCSequence::actions(fadeout, delay, back, NULL)); } }; @@ -360,14 +360,14 @@ TextLayer::TextLayer(void) grossini->setPosition( CGPointMake(x/3,y/2) ); CCIntervalAction* sc = CCScaleBy::actionWithDuration(2, 5); CCIntervalAction* sc_back = sc->reverse(); - grossini->runAction( CCRepeatForever::actionWithAction( dynamic_cast(CCSequence::actions(sc, sc_back, NULL)) ) ); + grossini->runAction( CCRepeatForever::actionWithAction((CCIntervalAction*)(CCSequence::actions(sc, sc_back, NULL)) ) ); CCSprite* tamara = CCSprite::spriteWithFile(s_pPathSister1); node->addChild(tamara, 1); tamara->setPosition( CGPointMake(2*x/3,y/2) ); CCIntervalAction* sc2 = CCScaleBy::actionWithDuration(2, 5); CCIntervalAction* sc2_back = sc2->reverse(); - tamara->runAction( CCRepeatForever::actionWithAction( dynamic_cast(CCSequence::actions(sc2, sc2_back, NULL)) ) ); + tamara->runAction( CCRepeatForever::actionWithAction((CCIntervalAction*)(CCSequence::actions(sc2, sc2_back, NULL))) ); CCLabel* label = CCLabel::labelWithString((effectsList[actionIdx]).c_str(), "Marker Felt", 32);