mirror of https://github.com/axmolengine/axmol.git
issue #1425: change the design of CCCallFunc::create(int nHandler)
This commit is contained in:
parent
96e621bae8
commit
b815504d69
|
@ -384,11 +384,11 @@ CCCallFunc * CCCallFunc::create(int nHandler)
|
||||||
if (pRet) {
|
if (pRet) {
|
||||||
pRet->m_nScriptHandler = nHandler;
|
pRet->m_nScriptHandler = nHandler;
|
||||||
pRet->autorelease();
|
pRet->autorelease();
|
||||||
return pRet;
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
CC_SAFE_DELETE(pRet);
|
CC_SAFE_DELETE(pRet);
|
||||||
return NULL;
|
}
|
||||||
|
return pRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
|
bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
|
||||||
|
@ -477,11 +477,11 @@ CCCallFuncN * CCCallFuncN::create(int nHandler)
|
||||||
if (pRet) {
|
if (pRet) {
|
||||||
pRet->m_nScriptHandler = nHandler;
|
pRet->m_nScriptHandler = nHandler;
|
||||||
pRet->autorelease();
|
pRet->autorelease();
|
||||||
return pRet;
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
CC_SAFE_DELETE(pRet);
|
CC_SAFE_DELETE(pRet);
|
||||||
return NULL;
|
}
|
||||||
|
return pRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCCallFuncN::initWithTarget(CCObject* pSelectorTarget,
|
bool CCCallFuncN::initWithTarget(CCObject* pSelectorTarget,
|
||||||
|
|
Loading…
Reference in New Issue