diff --git a/cocos2dx/include/CCSprite.h b/cocos2dx/include/CCSprite.h index 73a0d2fea6..f67029ba02 100644 --- a/cocos2dx/include/CCSprite.h +++ b/cocos2dx/include/CCSprite.h @@ -198,7 +198,7 @@ public: static CCSprite* spriteWithBatchNode(CCSpriteBatchNode *batchNode, const CCRect& rect); public: - bool init(void); + virtual bool init(void); virtual ~CCSprite(void); CCSprite(); diff --git a/cocos2dx/sprite_nodes/CCSprite.cpp b/cocos2dx/sprite_nodes/CCSprite.cpp index 44189b86e2..0661611d93 100644 --- a/cocos2dx/sprite_nodes/CCSprite.cpp +++ b/cocos2dx/sprite_nodes/CCSprite.cpp @@ -323,7 +323,6 @@ CCSprite* CCSprite::initWithCGImage(CGImageRef pImage, const char *pszKey) CCSprite::CCSprite() : m_pobTexture(NULL) { - init(); } CCSprite::~CCSprite(void)