Merge pull request #2795 from flaming0/sd-func-fix-win-build

Fix VS build (nullptr instead of NULL when assigning to std function)
This commit is contained in:
minggo 2013-06-06 19:48:24 -07:00
commit cf674ce5ba
3 changed files with 11 additions and 11 deletions

View File

@ -213,7 +213,7 @@ public:
: m_pSelectorTarget(NULL)
, m_nScriptHandler(0)
, m_pCallFunc(NULL)
, _function(NULL)
, _function(nullptr)
{
}
virtual ~CCCallFunc();

View File

@ -52,7 +52,7 @@ const unsigned int kDisableTag = 0x3;
CCMenuItem* CCMenuItem::create()
{
return CCMenuItem::create((const ccMenuCallback&)NULL);
return CCMenuItem::create((const ccMenuCallback&)nullptr);
}
// XXX deprecated
@ -228,7 +228,7 @@ CCMenuItemLabel * CCMenuItemLabel::create(CCNode*label, const ccMenuCallback& ca
CCMenuItemLabel* CCMenuItemLabel::create(CCNode *label)
{
CCMenuItemLabel *pRet = new CCMenuItemLabel();
pRet->initWithLabel(label, (const ccMenuCallback&) NULL);
pRet->initWithLabel(label, (const ccMenuCallback&) nullptr);
pRet->autorelease();
return pRet;
}
@ -335,7 +335,7 @@ void CCMenuItemLabel::setEnabled(bool enabled)
CCMenuItemAtlasFont * CCMenuItemAtlasFont::create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap)
{
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)NULL);
return CCMenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)nullptr);
}
// XXX: deprecated
@ -428,7 +428,7 @@ CCMenuItemFont * CCMenuItemFont::create(const char *value, const ccMenuCallback&
CCMenuItemFont * CCMenuItemFont::create(const char *value)
{
CCMenuItemFont *pRet = new CCMenuItemFont();
pRet->initWithString(value, (const ccMenuCallback&)NULL);
pRet->initWithString(value, (const ccMenuCallback&)nullptr);
pRet->autorelease();
return pRet;
}
@ -573,7 +573,7 @@ void CCMenuItemSprite::setDisabledImage(CCNode* pImage)
CCMenuItemSprite * CCMenuItemSprite::create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite)
{
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)NULL);
return CCMenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)nullptr);
}
// XXX deprecated
@ -728,12 +728,12 @@ CCMenuItemImage* CCMenuItemImage::create()
bool CCMenuItemImage::init(void)
{
return initWithNormalImage(NULL, NULL, NULL, (const ccMenuCallback&)NULL);
return initWithNormalImage(NULL, NULL, NULL, (const ccMenuCallback&)nullptr);
}
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage)
{
return CCMenuItemImage::create(normalImage, selectedImage, NULL, (const ccMenuCallback&)NULL);
return CCMenuItemImage::create(normalImage, selectedImage, NULL, (const ccMenuCallback&)nullptr);
}
// XXX deprecated
@ -775,7 +775,7 @@ CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *s
CCMenuItemImage * CCMenuItemImage::create(const char *normalImage, const char *selectedImage, const char *disabledImage)
{
CCMenuItemImage *pRet = new CCMenuItemImage();
if (pRet && pRet->initWithNormalImage(normalImage, selectedImage, disabledImage, (const ccMenuCallback&)NULL))
if (pRet && pRet->initWithNormalImage(normalImage, selectedImage, disabledImage, (const ccMenuCallback&)nullptr))
{
pRet->autorelease();
return pRet;
@ -952,7 +952,7 @@ CCMenuItemToggle* CCMenuItemToggle::create(CCMenuItem *item)
bool CCMenuItemToggle::initWithItem(CCMenuItem *item)
{
CCMenuItem::initWithCallback((const ccMenuCallback&)NULL);
CCMenuItem::initWithCallback((const ccMenuCallback&)nullptr);
setSubItems(CCArray::create());
if (item)

View File

@ -71,7 +71,7 @@ public:
, m_bEnabled(false)
, m_nScriptTapHandler(0)
, _target(NULL)
, _callback(NULL)
, _callback(nullptr)
{}
virtual ~CCMenuItem();