Merge pull request #4848 from dumganhar/more-warning-fixes

More warning fixes.
This commit is contained in:
minggo 2014-01-03 17:31:02 -08:00
commit 964d327db9
6 changed files with 10 additions and 10 deletions

View File

@ -134,7 +134,7 @@ void PointArray::insertControlPoint(Point &controlPoint, ssize_t index)
Point PointArray::getControlPointAtIndex(ssize_t index)
{
index = static_cast<int>(MIN(_controlPoints->size()-1, MAX(index, 0)));
index = MIN(_controlPoints->size()-1, MAX(index, 0));
return *(_controlPoints->at(index));
}

View File

@ -501,7 +501,7 @@ void CCBAnimationManager::setAnimatedProperty(const std::string& propName, Node
}
else if (propName == "displayFrame")
{
static_cast<Sprite*>(pNode)->setDisplayFrame(static_cast<SpriteFrame*>(obj));
static_cast<Sprite*>(pNode)->setSpriteFrame(static_cast<SpriteFrame*>(obj));
}
else if (propName == "color")
{
@ -1002,7 +1002,7 @@ CCBSetSpriteFrame* CCBSetSpriteFrame::reverse() const
void CCBSetSpriteFrame::update(float time)
{
((Sprite*)_target)->setDisplayFrame(_spriteFrame);
static_cast<Sprite*>(_target)->setSpriteFrame(_spriteFrame);
}

View File

@ -13,7 +13,7 @@ namespace cocosbuilder {
void SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) {
if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) {
if(pSpriteFrame != NULL) {
((Sprite *)pNode)->setDisplayFrame(pSpriteFrame);
((Sprite *)pNode)->setSpriteFrame(pSpriteFrame);
} else {
CCLOG("ERROR: SpriteFrame NULL");
}

View File

@ -80,19 +80,19 @@ public:
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesBegan(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesBegan(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesMoved(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesMoved(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(cocos2d::Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(cocos2d::__Set *pTouches, cocos2d::Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
/**
* @js NA
*/

View File

@ -312,7 +312,7 @@ const Rect& Layout::getClippingRect()
{
_handleScissor = true;
Point worldPos = convertToWorldSpace(Point::ZERO);
AffineTransform t = nodeToWorldTransform();
AffineTransform t = getNodeToWorldAffineTransform();
float scissorWidth = _size.width*t.a;
float scissorHeight = _size.height*t.d;
Rect parentClippingRect;

View File

@ -49,7 +49,7 @@ public:
void addJoint(PhysicsJointInfo& joint);
void removeJoint(PhysicsJointInfo& joint);
void setGravity(const Vect& gravity);
inline bool isLocked() { return static_cast<bool>(_space->locked_private); }
inline bool isLocked() { return 0 == _space->locked_private ? false : true; }
inline void step(float delta) { cpSpaceStep(_space, delta); }
private: