From 8270ee3e4825154341b4228f2ab337836d150673 Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Fri, 16 Nov 2012 15:10:25 +0800 Subject: [PATCH 1/2] fix -Wreorder warning In the class definition, the field m_nScriptHandler is declared before m_pCallFunc, so we should follow the order in initialization as well. --- cocos2dx/actions/CCActionInstant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/actions/CCActionInstant.h b/cocos2dx/actions/CCActionInstant.h index 334119446c..11e607fb73 100644 --- a/cocos2dx/actions/CCActionInstant.h +++ b/cocos2dx/actions/CCActionInstant.h @@ -215,8 +215,8 @@ class CC_DLL CCCallFunc : public CCActionInstant // public: CCCallFunc() : m_pSelectorTarget(NULL) - , m_pCallFunc(NULL) , m_nScriptHandler(0) + , m_pCallFunc(NULL) { } virtual ~CCCallFunc() From 17e23f61a77d7ef8d2e127a76fe397c6f82e2d1f Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Fri, 16 Nov 2012 15:19:43 +0800 Subject: [PATCH 2/2] remove unused private field in KeypadTest --- samples/TestCpp/Classes/KeypadTest/KeypadTest.cpp | 1 - samples/TestCpp/Classes/KeypadTest/KeypadTest.h | 1 - 2 files changed, 2 deletions(-) diff --git a/samples/TestCpp/Classes/KeypadTest/KeypadTest.cpp b/samples/TestCpp/Classes/KeypadTest/KeypadTest.cpp index 9720f7c165..c5d0cea32e 100644 --- a/samples/TestCpp/Classes/KeypadTest/KeypadTest.cpp +++ b/samples/TestCpp/Classes/KeypadTest/KeypadTest.cpp @@ -1,7 +1,6 @@ #include "KeypadTest.h" KeypadTest::KeypadTest() -: m_bShow(true) { CCSize s = CCDirector::sharedDirector()->getWinSize(); CCLabelTTF* label = CCLabelTTF::create("Keypad Test", "Arial", 28); diff --git a/samples/TestCpp/Classes/KeypadTest/KeypadTest.h b/samples/TestCpp/Classes/KeypadTest/KeypadTest.h index 9bd1f30463..f9d56d2835 100644 --- a/samples/TestCpp/Classes/KeypadTest/KeypadTest.h +++ b/samples/TestCpp/Classes/KeypadTest/KeypadTest.h @@ -15,7 +15,6 @@ public: private: CCLabelTTF* m_pLabel; - bool m_bShow; }; class KeypadTestScene : public TestScene