mirror of https://github.com/axmolengine/axmol.git
issue #85: remove the use of static_cast()
This commit is contained in:
parent
39c6ebf503
commit
c293bd456f
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue