From a411f4877c038debcede9852978388d1ce030376 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 29 Aug 2011 11:00:31 +0800 Subject: [PATCH] fixed #698:Not invoke init() in the construction of CCSprite --- cocos2dx/include/CCSprite.h | 2 +- cocos2dx/sprite_nodes/CCSprite.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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)