From d326db427f7ce39d33c458f2a8231ac07ba50c21 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 8 Oct 2014 18:30:23 -0700 Subject: [PATCH 1/2] removes the `3d_export.h` file --- build/cocos2d_libs.xcodeproj/project.pbxproj | 6 ---- cocos/3d/3dExport.h | 31 -------------------- cocos/3d/CCAABB.h | 3 +- cocos/3d/CCAnimate3D.h | 3 +- cocos/3d/CCAnimation3D.h | 3 +- cocos/3d/CCAttachNode.h | 3 +- cocos/3d/CCBillBoard.h | 3 +- cocos/3d/CCBundle3D.h | 3 +- cocos/3d/CCMesh.h | 3 +- cocos/3d/CCMeshSkin.h | 3 +- cocos/3d/CCMeshVertexIndexData.h | 1 - cocos/3d/CCOBB.h | 3 +- cocos/3d/CCRay.h | 3 +- cocos/3d/CCSkeleton3D.h | 5 ++-- cocos/3d/CCSprite3D.h | 5 ++-- 15 files changed, 14 insertions(+), 64 deletions(-) delete mode 100644 cocos/3d/3dExport.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index aa1d8e65ef..4164e3cd82 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 15AE180619AAD2F700C27E9E /* 3dExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E319AAD2F700C27E9E /* 3dExport.h */; }; - 15AE180719AAD2F700C27E9E /* 3dExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E319AAD2F700C27E9E /* 3dExport.h */; }; 15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */; }; 15AE180919AAD2F700C27E9E /* CCAABB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */; }; 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AE17E519AAD2F700C27E9E /* CCAABB.h */; }; @@ -1841,7 +1839,6 @@ 06CAAAC1186AD63B0012A414 /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = ""; }; 1551A33F158F2AB200E66CFE /* libcocos2d Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2d Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1551A342158F2AB200E66CFE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 15AE17E319AAD2F700C27E9E /* 3dExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 3dExport.h; sourceTree = ""; }; 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAABB.cpp; sourceTree = ""; }; 15AE17E519AAD2F700C27E9E /* CCAABB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAABB.h; sourceTree = ""; }; 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAnimate3D.cpp; sourceTree = ""; }; @@ -4765,7 +4762,6 @@ children = ( B60C5BD219AC68B10056FBDE /* CCBillBoard.cpp */, B60C5BD319AC68B10056FBDE /* CCBillBoard.h */, - 15AE17E319AAD2F700C27E9E /* 3dExport.h */, 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */, 15AE17E519AAD2F700C27E9E /* CCAABB.h */, 15AE17E619AAD2F700C27E9E /* CCAnimate3D.cpp */, @@ -4894,7 +4890,6 @@ 1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */, 1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 50ABBD911925AB4100A911A9 /* CCGLProgramCache.h in Headers */, - 15AE180619AAD2F700C27E9E /* 3dExport.h in Headers */, 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */, 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */, 15AE1A8F19AAD40300C27E9E /* b2RopeJoint.h in Headers */, @@ -5616,7 +5611,6 @@ 1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */, 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, B375107F1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, - 15AE180719AAD2F700C27E9E /* 3dExport.h in Headers */, 15AE1A2019AAD3A700C27E9E /* spine-cocos2dx.h in Headers */, 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, diff --git a/cocos/3d/3dExport.h b/cocos/3d/3dExport.h deleted file mode 100644 index e2066a0f28..0000000000 --- a/cocos/3d/3dExport.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __COCOS_3D_3DEXPORT_H__ -#define __COCOS_3D_3DEXPORT_H__ - -#if defined(WIN32) && defined(_WINDOWS) - #ifdef __MINGW32__ - #include - #endif - - #if defined(CC_STATIC) - #define CC_3D_DLL - #else - #if defined(_USE3DDLL) - #define CC_3D_DLL __declspec(dllexport) - #else /* use a DLL library */ - #define CC_3D_DLL __declspec(dllimport) - #endif - #endif - - /* Define NULL pointer value */ - #ifndef NULL - #ifdef __cplusplus - #define NULL 0 - #else - #define NULL ((void *)0) - #endif - #endif -#else - #define CC_3D_DLL -#endif - -#endif // __COCOS_3D_3DEXPORT_H__ diff --git a/cocos/3d/CCAABB.h b/cocos/3d/CCAABB.h index 2838d90fc7..860912d07a 100644 --- a/cocos/3d/CCAABB.h +++ b/cocos/3d/CCAABB.h @@ -27,11 +27,10 @@ #include "base/ccMacros.h" #include "math/CCMath.h" -#include "3d/3dExport.h" NS_CC_BEGIN -class CC_3D_DLL AABB +class CC_DLL AABB { public: diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index 5591e96f4b..cf46227697 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -29,7 +29,6 @@ #include #include "3d/CCAnimation3D.h" -#include "3d/3dExport.h" #include "base/ccMacros.h" #include "base/CCRef.h" #include "2d/CCActionInterval.h" @@ -41,7 +40,7 @@ class Sprite3D; /** * Animate3D, Animates a Sprite3D given with an Animation3D */ -class CC_3D_DLL Animate3D: public ActionInterval +class CC_DLL Animate3D: public ActionInterval { public: diff --git a/cocos/3d/CCAnimation3D.h b/cocos/3d/CCAnimation3D.h index 3be514be6e..a535e94e7b 100644 --- a/cocos/3d/CCAnimation3D.h +++ b/cocos/3d/CCAnimation3D.h @@ -32,14 +32,13 @@ #include "base/ccMacros.h" #include "base/CCRef.h" #include "3d/CCBundle3DData.h" -#include "3d/3dExport.h" NS_CC_BEGIN /** * static animation data, shared */ -class CC_3D_DLL Animation3D: public Ref +class CC_DLL Animation3D: public Ref { friend class Bundle3D; public: diff --git a/cocos/3d/CCAttachNode.h b/cocos/3d/CCAttachNode.h index 57013cceb6..f312b6cc7c 100644 --- a/cocos/3d/CCAttachNode.h +++ b/cocos/3d/CCAttachNode.h @@ -27,7 +27,6 @@ #include "math/CCMath.h" #include "2d/CCNode.h" -#include "3d/3dExport.h" NS_CC_BEGIN @@ -40,7 +39,7 @@ class Bone3D; * auto attachNode = sprite->getAttachNode("left hand"); * attachNode->addChild(weapon); */ -class CC_3D_DLL AttachNode : public Node +class CC_DLL AttachNode : public Node { public: /** diff --git a/cocos/3d/CCBillBoard.h b/cocos/3d/CCBillBoard.h index a96fa15ed7..bd3e1cba7f 100644 --- a/cocos/3d/CCBillBoard.h +++ b/cocos/3d/CCBillBoard.h @@ -26,14 +26,13 @@ #define __CCBILLBOARD_H__ #include "2d/CCSprite.h" -#include "3d/3dExport.h" NS_CC_BEGIN /** * Inherit from Sprite, achieve BillBoard. */ -class CC_3D_DLL BillBoard : public Sprite +class CC_DLL BillBoard : public Sprite { public: diff --git a/cocos/3d/CCBundle3D.h b/cocos/3d/CCBundle3D.h index bd100d6d7a..7512cf8b3a 100644 --- a/cocos/3d/CCBundle3D.h +++ b/cocos/3d/CCBundle3D.h @@ -26,7 +26,6 @@ #define __CCBUNDLE3D_H__ #include "3d/CCBundle3DData.h" -#include "3d/3dExport.h" #include "3d/CCBundleReader.h" #include "json/document.h" @@ -40,7 +39,7 @@ class Data; * c3t text file * c3b binary file */ -class CC_3D_DLL Bundle3D +class CC_DLL Bundle3D { public: /**you can define yourself bundle and set it, use default bundle otherwise*/ diff --git a/cocos/3d/CCMesh.h b/cocos/3d/CCMesh.h index b8c774a680..06e42c0b85 100644 --- a/cocos/3d/CCMesh.h +++ b/cocos/3d/CCMesh.h @@ -29,7 +29,6 @@ #include "3d/CCBundle3DData.h" #include "3d/CCAABB.h" -#include "3d/3dExport.h" #include "base/CCRef.h" #include "math/CCMath.h" @@ -45,7 +44,7 @@ class GLProgram; /** * Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on */ -class CC_3D_DLL Mesh : public Ref +class CC_DLL Mesh : public Ref { friend class Sprite3D; public: diff --git a/cocos/3d/CCMeshSkin.h b/cocos/3d/CCMeshSkin.h index edc2cdfc75..2b49425250 100644 --- a/cocos/3d/CCMeshSkin.h +++ b/cocos/3d/CCMeshSkin.h @@ -26,7 +26,6 @@ #define __CCMESHSKIN_H__ #include "3d/CCBundle3DData.h" -#include "3d/3dExport.h" #include "base/CCRef.h" #include "base/CCVector.h" #include "math/CCMath.h" @@ -41,7 +40,7 @@ class Skeleton3D; * MeshSkin, A class maintain a collection of bones that affect Mesh vertex. * And it is responsible for computing matrix palletes that used by skin mesh rendering. */ -class CC_3D_DLL MeshSkin: public Ref +class CC_DLL MeshSkin: public Ref { public: diff --git a/cocos/3d/CCMeshVertexIndexData.h b/cocos/3d/CCMeshVertexIndexData.h index 1c540b72c8..400ceaa5b2 100644 --- a/cocos/3d/CCMeshVertexIndexData.h +++ b/cocos/3d/CCMeshVertexIndexData.h @@ -30,7 +30,6 @@ #include "3d/CCBundle3DData.h" #include "3d/CCAABB.h" -#include "3d/3dExport.h" #include "base/CCRef.h" #include "base/CCVector.h" diff --git a/cocos/3d/CCOBB.h b/cocos/3d/CCOBB.h index 917472f224..0fd8c1eea1 100644 --- a/cocos/3d/CCOBB.h +++ b/cocos/3d/CCOBB.h @@ -26,11 +26,10 @@ #define __CC_OBB_H__ #include "CCAABB.h" -#include "3d/3dExport.h" NS_CC_BEGIN -class CC_3D_DLL OBB +class CC_DLL OBB { public: OBB(); diff --git a/cocos/3d/CCRay.h b/cocos/3d/CCRay.h index 8c127a8198..417147d56d 100644 --- a/cocos/3d/CCRay.h +++ b/cocos/3d/CCRay.h @@ -28,11 +28,10 @@ #include "math/CCMath.h" #include "3d/CCAABB.h" #include "3d/CCOBB.h" -#include "3d/3dExport.h" NS_CC_BEGIN -class CC_3D_DLL Ray +class CC_DLL Ray { public: /** diff --git a/cocos/3d/CCSkeleton3D.h b/cocos/3d/CCSkeleton3D.h index 26bb85c73b..8e97933c93 100644 --- a/cocos/3d/CCSkeleton3D.h +++ b/cocos/3d/CCSkeleton3D.h @@ -26,7 +26,6 @@ #define __CCSKELETON3D_H__ #include "3d/CCBundle3DData.h" -#include "3d/3dExport.h" #include "base/CCRef.h" #include "base/CCVector.h" @@ -36,7 +35,7 @@ NS_CC_BEGIN /** * Defines a basic hierachial structure of transformation spaces. */ -class CC_3D_DLL Bone3D : public Ref +class CC_DLL Bone3D : public Ref { friend class Skeleton3D; friend class MeshSkin; @@ -179,7 +178,7 @@ protected: * Skeleton * */ -class CC_3D_DLL Skeleton3D: public Ref +class CC_DLL Skeleton3D: public Ref { public: diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index 55d81d731e..81ea846164 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -37,7 +37,6 @@ #include "3d/CCAABB.h" #include "3d/CCBundle3DData.h" #include "3d/CCMeshVertexIndexData.h" -#include "3d/3dExport.h" NS_CC_BEGIN @@ -48,7 +47,7 @@ class MeshSkin; class AttachNode; struct NodeData; /** Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */ -class CC_3D_DLL Sprite3D : public Node, public BlendProtocol +class CC_DLL Sprite3D : public Node, public BlendProtocol { public: /** creates a Sprite3D*/ @@ -214,7 +213,7 @@ protected: std::unordered_map _spriteDatas; //cached sprite datas }; -extern std::string CC_3D_DLL s_attributeNames[];//attribute names array +extern std::string CC_DLL s_attributeNames[];//attribute names array NS_CC_END #endif // __SPRITE3D_H_ From 27cb6afb5e6e84774f95ff1dc2f555ce27507d4a Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 8 Oct 2014 18:55:33 -0700 Subject: [PATCH 2/2] fixes warnings on Android --- tests/cpp-empty-test/Classes/HelloWorldScene.cpp | 2 +- .../cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp | 4 ++-- tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp | 2 +- .../Classes/ClippingNodeTest/ClippingNodeTest.cpp | 2 +- tests/cpp-tests/Classes/LightTest/LightTest.cpp | 10 +++++----- tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/cpp-empty-test/Classes/HelloWorldScene.cpp b/tests/cpp-empty-test/Classes/HelloWorldScene.cpp index a8c62b1843..8b603e79bf 100644 --- a/tests/cpp-empty-test/Classes/HelloWorldScene.cpp +++ b/tests/cpp-empty-test/Classes/HelloWorldScene.cpp @@ -45,7 +45,7 @@ bool HelloWorld::init() closeItem->setPosition(origin + Vec2(visibleSize) - Vec2(closeItem->getContentSize() / 2)); // create menu, it's an autorelease object - auto menu = Menu::create(closeItem, NULL); + auto menu = Menu::create(closeItem, nullptr); menu->setPosition(Vec2::ZERO); this->addChild(menu, 1); diff --git a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp index e06a4be1df..b13fd39fa6 100644 --- a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp +++ b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp @@ -123,7 +123,7 @@ BillBoardTest::BillBoardTest() auto menuItem1 = MenuItemLabel::create(label1, CC_CALLBACK_1(BillBoardTest::rotateCameraCallback,this,10)); auto label2 = Label::createWithTTF(ttfConfig,"rotate-"); auto menuItem2 = MenuItemLabel::create(label2, CC_CALLBACK_1(BillBoardTest::rotateCameraCallback,this,-10)); - auto menu = Menu::create(menuItem1,menuItem2,NULL); + auto menu = Menu::create(menuItem1, menuItem2, nullptr); menu->setPosition(Vec2::ZERO); menuItem1->setPosition( Vec2( s.width-80, VisibleRect::top().y-160) ); menuItem2->setPosition( Vec2( s.width-80, VisibleRect::top().y-190) ); @@ -137,7 +137,7 @@ BillBoardTest::BillBoardTest() menuItem1->setPosition( Vec2( s.width-80, VisibleRect::top().y-100) ); menuItem2->setPosition( Vec2( s.width-80, VisibleRect::top().y-130) ); - menu = Menu::create(menuItem1,menuItem2,NULL); + menu = Menu::create(menuItem1, menuItem2, nullptr); menu->setPosition(Vec2(0,0)); this->addChild(menu, 10); menuCallback_orientedPoint(nullptr); diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index f6b4d26ac5..a1d8245141 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -278,7 +278,7 @@ void Camera3DTestDemo::onEnter() auto menuItem6 = MenuItemLabel::create(label6, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::ThirdCamera)); auto label7 = Label::createWithTTF(ttfConfig,"first person"); auto menuItem7 = MenuItemLabel::create(label7, CC_CALLBACK_1(Camera3DTestDemo::SwitchViewCallback,this,CameraType::FirstCamera)); - auto menu = Menu::create(menuItem1,menuItem2,menuItem3,menuItem4,menuItem5,menuItem6,menuItem7,NULL); + auto menu = Menu::create(menuItem1, menuItem2, menuItem3, menuItem4, menuItem5, menuItem6, menuItem7, nullptr); menu->setPosition(Vec2::ZERO); menuItem1->setPosition(s.width-50, VisibleRect::top().y-50 ); diff --git a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp index 019dbdce37..89618bef6b 100644 --- a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -988,7 +988,7 @@ void ClippingToRenderTextureTest::setup() auto s = Director::getInstance()->getWinSize(); // create menu, it's an autorelease object - auto menu = Menu::create(button, NULL); + auto menu = Menu::create(button, nullptr); menu->setPosition(Point(s.width/2, s.height/2)); this->addChild(menu, 1); diff --git a/tests/cpp-tests/Classes/LightTest/LightTest.cpp b/tests/cpp-tests/Classes/LightTest/LightTest.cpp index ba019a65c9..6d15d2f5ed 100644 --- a/tests/cpp-tests/Classes/LightTest/LightTest.cpp +++ b/tests/cpp-tests/Classes/LightTest/LightTest.cpp @@ -65,7 +65,7 @@ LightTest::LightTest() _spotLightLabel = Label::createWithTTF(ttfConfig,"Spot Light OFF"); _spotLightLabel->retain(); auto menuItem3 = MenuItemLabel::create(_spotLightLabel, CC_CALLBACK_1(LightTest::SwitchLight,this,LightType::SPOT)); - auto menu = Menu::create(menuItem0, menuItem1,menuItem2,menuItem3,NULL); + auto menu = Menu::create(menuItem0, menuItem1, menuItem2, menuItem3, nullptr); menu->setPosition(Vec2::ZERO); menuItem0->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); menuItem0->setPosition( Vec2(VisibleRect::left().x, VisibleRect::top().y-50) ); @@ -239,7 +239,7 @@ void LightTest::addLights() auto tintto2 = TintTo::create(4, 0, 255, 0); auto tintto3 = TintTo::create(4, 255, 0, 0); auto tintto4 = TintTo::create(4, 255, 255, 255); - auto seq = Sequence::create(tintto1,tintto2, tintto3, tintto4, NULL); + auto seq = Sequence::create(tintto1,tintto2, tintto3, tintto4, nullptr); _ambientLight->runAction(RepeatForever::create(seq)); } @@ -248,7 +248,7 @@ void LightTest::addLights() auto tintto2 = TintTo::create(4, 0, 255, 0); auto tintto3 = TintTo::create(4, 0, 0, 255); auto tintto4 = TintTo::create(4, 255, 255, 255); - auto seq = Sequence::create(tintto1,tintto2, tintto3, tintto4, NULL); + auto seq = Sequence::create(tintto1,tintto2, tintto3, tintto4, nullptr); _directionalLight->runAction(RepeatForever::create(seq)); } @@ -257,7 +257,7 @@ void LightTest::addLights() auto tintto2 = TintTo::create(4, 0, 255, 0); auto tintto3 = TintTo::create(4, 0, 0, 255); auto tintto4 = TintTo::create(4, 255, 255, 255); - auto seq = Sequence::create(tintto2, tintto1, tintto3, tintto4, NULL); + auto seq = Sequence::create(tintto2, tintto1, tintto3, tintto4, nullptr); _pointLight->runAction(RepeatForever::create(seq)); } @@ -266,7 +266,7 @@ void LightTest::addLights() auto tintto2 = TintTo::create(4, 0, 255, 0); auto tintto3 = TintTo::create(4, 0, 0, 255); auto tintto4 = TintTo::create(4, 255, 255, 255); - auto seq = Sequence::create(tintto3, tintto2, tintto1, tintto4, NULL); + auto seq = Sequence::create(tintto3, tintto2, tintto1, tintto4, nullptr); _spotLight->runAction(RepeatForever::create(seq)); } } diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 92c3587968..963f289915 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -1021,7 +1021,7 @@ Sprite3DReskinTest::Sprite3DReskinTest() item3->setPosition( Vec2(VisibleRect::left().x+50, VisibleRect::bottom().y+item1->getContentSize().height*6 ) ); item4->setPosition( Vec2(VisibleRect::left().x+50, VisibleRect::bottom().y+item1->getContentSize().height *7 ) ); item5->setPosition( Vec2(VisibleRect::left().x+50, VisibleRect::bottom().y+item1->getContentSize().height *8 ) ); - auto pMenu1 = CCMenu::create(item1,item2,item3,item4,item5,NULL); + auto pMenu1 = CCMenu::create(item1, item2, item3, item4, item5, nullptr); pMenu1->setPosition(Vec2(0,0)); this->addChild(pMenu1, 10);