issue #85: remove the use of static_cast()

This commit is contained in:
Ming 2010-08-31 03:23:54 +00:00
parent 39c6ebf503
commit c293bd456f
2 changed files with 4 additions and 4 deletions

View File

@ -573,16 +573,16 @@ namespace cocos2d{
} }
// ignore invisible and disabled items: issue #779, #866 // ignore invisible and disabled items: issue #779, #866
if ((*it)->getIsVisible() && static_cast<CCMenuItem*>(*it)->getIsEnabled()) if ((*it)->getIsVisible() && ((CCMenuItem*)(*it))->getIsEnabled())
{ {
CGPoint local = (*it)->convertToNodeSpace(touchLocation); CGPoint local = (*it)->convertToNodeSpace(touchLocation);
CGRect r = static_cast<CCMenuItem*>(*it)->rect(); CGRect r = ((CCMenuItem*)(*it))->rect();
r.origin = CGPointZero; r.origin = CGPointZero;
if (CGRect::CGRectContainsPoint(r, local)) if (CGRect::CGRectContainsPoint(r, local))
{ {
return static_cast<CCMenuItem*>(*it); return (CCMenuItem*)(*it);
} }
} }
} }

View File

@ -435,7 +435,7 @@ namespace cocos2d{
if(disabledImage) if(disabledImage)
disabledSprite = CCSprite::spriteWithFile(disabledImage); disabledSprite = CCSprite::spriteWithFile(disabledImage);
return static_cast<CCMenuItemImage*>(initFromNormalSprite(normalSprite, selectedSprite, disabledSprite, target, selector)); return (CCMenuItemImage*)(initFromNormalSprite(normalSprite, selectedSprite, disabledSprite, target, selector));
} }
// //
// MenuItemToggle // MenuItemToggle