issue #1425: change the design of CCCallFunc::create(int nHandler)

This commit is contained in:
mustime 2012-08-23 16:27:22 +08:00
parent 96e621bae8
commit b815504d69
1 changed files with 8 additions and 8 deletions

View File

@ -384,11 +384,11 @@ CCCallFunc * CCCallFunc::create(int nHandler)
if (pRet) {
pRet->m_nScriptHandler = nHandler;
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
else{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
@ -477,11 +477,11 @@ CCCallFuncN * CCCallFuncN::create(int nHandler)
if (pRet) {
pRet->m_nScriptHandler = nHandler;
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
else{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCCallFuncN::initWithTarget(CCObject* pSelectorTarget,