More warning fixes.

This commit is contained in:
James Chen 2014-01-04 09:17:37 +08:00
parent 118fe45cce
commit 46153d8c34
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) 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)); return *(_controlPoints->at(index));
} }

View File

@ -501,7 +501,7 @@ void CCBAnimationManager::setAnimatedProperty(const std::string& propName, Node
} }
else if (propName == "displayFrame") 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") else if (propName == "color")
{ {
@ -1002,7 +1002,7 @@ CCBSetSpriteFrame* CCBSetSpriteFrame::reverse() const
void CCBSetSpriteFrame::update(float time) 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) { void SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) {
if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) { if(strcmp(pPropertyName, PROPERTY_DISPLAYFRAME) == 0) {
if(pSpriteFrame != NULL) { if(pSpriteFrame != NULL) {
((Sprite *)pNode)->setDisplayFrame(pSpriteFrame); ((Sprite *)pNode)->setSpriteFrame(pSpriteFrame);
} else { } else {
CCLOG("ERROR: SpriteFrame NULL"); CCLOG("ERROR: SpriteFrame NULL");
} }

View File

@ -80,19 +80,19 @@ public:
/** /**
* @js NA * @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 * @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 * @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 * @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 * @js NA
*/ */

View File

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

View File

@ -49,7 +49,7 @@ public:
void addJoint(PhysicsJointInfo& joint); void addJoint(PhysicsJointInfo& joint);
void removeJoint(PhysicsJointInfo& joint); void removeJoint(PhysicsJointInfo& joint);
void setGravity(const Vect& gravity); 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); } inline void step(float delta) { cpSpaceStep(_space, delta); }
private: private: