Fix for compilation issue due to pointer to int32 conversion.

Fix warning.
This commit is contained in:
rh101 2021-09-02 16:38:23 +10:00
parent fcaaa9a135
commit 546d7d6c61
1 changed files with 3 additions and 3 deletions

View File

@ -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<Touch*>& t
void Sprite3DWithOBBPerformanceTest::update(float dt)
{
char szText[16];
sprintf(szText, "%lu cubes", static_cast<uint32_t>(_obb.size()));
sprintf(szText, "%lu cubes", static_cast<unsigned long>(_obb.size()));
_labelCubeCount->setString(szText);
if (_drawDebug)