From 546d7d6c61791f26f22d7e40605561c95fdf75c7 Mon Sep 17 00:00:00 2001 From: rh101 Date: Thu, 2 Sep 2021 16:38:23 +1000 Subject: [PATCH] Fix for compilation issue due to pointer to int32 conversion. Fix warning. --- tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 3ce4a440e3..1f1c97ea5a 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -893,7 +893,7 @@ void AsyncLoadSprite3DTest::menuCallback_asyncLoadSprite(Ref* sender) void AsyncLoadSprite3DTest::asyncLoad_Callback(Sprite3D* sprite, void* param) { - auto index = (int32_t)param; + auto index = (long)param; auto node = getChildByTag(101); auto s = Director::getInstance()->getWinSize(); float width = s.width / _paths.size(); @@ -1324,7 +1324,7 @@ Sprite3DReskinTest::Sprite3DReskinTest() } void Sprite3DReskinTest::menuCallback_reSkin(Ref* sender) { - auto index = (int32_t)(((MenuItemLabel*)sender)->getUserData()); + auto index = (long)(((MenuItemLabel*)sender)->getUserData()); if (index < (int)SkinType::MAX_TYPE) { _curSkin[index] = (_curSkin[index] + 1) % _skins[index].size(); @@ -1506,7 +1506,7 @@ void Sprite3DWithOBBPerformanceTest::onTouchesMoved(const std::vector& t void Sprite3DWithOBBPerformanceTest::update(float dt) { char szText[16]; - sprintf(szText, "%lu cubes", static_cast(_obb.size())); + sprintf(szText, "%lu cubes", static_cast(_obb.size())); _labelCubeCount->setString(szText); if (_drawDebug)