@@ -2798,7 +2798,7 @@ static int tolua_cocos2d_Spawn_create(lua_State* tolua_S)
2798
2798
if (argc > 0 )
2799
2799
{
2800
2800
Vector<FiniteTimeAction*> array;
2801
- uint32_t i = 1 ;
2801
+ int i = 1 ;
2802
2802
2803
2803
if (1 == argc && tolua_istable (tolua_S, 2 , 0 , &tolua_err))
2804
2804
{
@@ -2890,7 +2890,7 @@ int lua_cocos2d_CardinalSplineBy_create(lua_State* tolua_S)
2890
2890
}
2891
2891
2892
2892
CC_SAFE_DELETE_ARRAY (arr);
2893
- CardinalSplineBy* tolua_ret = CardinalSplineBy::create (dur, points, ten);
2893
+ CardinalSplineBy* tolua_ret = CardinalSplineBy::create (( float ) dur, points, ( float ) ten);
2894
2894
if (NULL != tolua_ret)
2895
2895
{
2896
2896
int nID = (tolua_ret) ? (int )tolua_ret->_ID : -1 ;
@@ -2954,7 +2954,7 @@ int tolua_cocos2d_CatmullRomBy_create(lua_State* tolua_S)
2954
2954
}
2955
2955
2956
2956
CC_SAFE_DELETE_ARRAY (arr);
2957
- CatmullRomBy* tolua_ret = CatmullRomBy::create (dur, points);
2957
+ CatmullRomBy* tolua_ret = CatmullRomBy::create (( float ) dur, points);
2958
2958
if (NULL != tolua_ret)
2959
2959
{
2960
2960
int nID = (tolua_ret) ? (int )tolua_ret->_ID : -1 ;
@@ -3018,7 +3018,7 @@ int tolua_cocos2d_CatmullRomTo_create(lua_State* tolua_S)
3018
3018
}
3019
3019
3020
3020
CC_SAFE_DELETE_ARRAY (arr);
3021
- CatmullRomTo* tolua_ret = CatmullRomTo::create (dur, points);
3021
+ CatmullRomTo* tolua_ret = CatmullRomTo::create (( float ) dur, points);
3022
3022
if (NULL != tolua_ret)
3023
3023
{
3024
3024
int nID = (tolua_ret) ? (int )tolua_ret->_ID : -1 ;
@@ -3079,7 +3079,7 @@ int tolua_cocos2d_BezierBy_create(lua_State* tolua_S)
3079
3079
config.endPosition = arr[2 ];
3080
3080
CC_SAFE_DELETE_ARRAY (arr);
3081
3081
3082
- BezierBy* tolua_ret = BezierBy::create (t, config);
3082
+ BezierBy* tolua_ret = BezierBy::create (( float ) t, config);
3083
3083
if (NULL != tolua_ret)
3084
3084
{
3085
3085
int nID = (tolua_ret) ? (int )tolua_ret->_ID : -1 ;
@@ -3139,7 +3139,7 @@ int tolua_cocos2d_BezierTo_create(lua_State* tolua_S)
3139
3139
config.endPosition = arr[2 ];
3140
3140
CC_SAFE_DELETE_ARRAY (arr);
3141
3141
3142
- BezierTo* tolua_ret = BezierTo::create (t, config);
3142
+ BezierTo* tolua_ret = BezierTo::create (( float ) t, config);
3143
3143
if (NULL != tolua_ret)
3144
3144
{
3145
3145
int nID = (tolua_ret) ? (int )tolua_ret->_ID : -1 ;
@@ -3194,7 +3194,7 @@ static int tolua_cocos2dx_DrawNode_drawPolygon(lua_State* tolua_S)
3194
3194
goto tolua_lerror;
3195
3195
}
3196
3196
#endif
3197
- size_t size = lua_tonumber (tolua_S, 3 );
3197
+ int size = lua_tointeger (tolua_S, 3 );
3198
3198
if ( size > 0 )
3199
3199
{
3200
3200
cocos2d::Vec2* points = new (std::nothrow) cocos2d::Vec2[size];
@@ -3287,7 +3287,7 @@ int tolua_cocos2dx_DrawNode_drawSolidPoly(lua_State* tolua_S)
3287
3287
if (NULL == points)
3288
3288
return 0 ;
3289
3289
3290
- for (int i = 0 ; i < size; i++)
3290
+ for (unsigned int i = 0 ; i < size; i++)
3291
3291
{
3292
3292
lua_pushnumber (tolua_S,i + 1 );
3293
3293
lua_gettable (tolua_S,2 );
@@ -3366,7 +3366,7 @@ int tolua_cocos2dx_DrawNode_drawPoly(lua_State* tolua_S)
3366
3366
if (NULL == points)
3367
3367
return 0 ;
3368
3368
3369
- for (int i = 0 ; i < size; i++)
3369
+ for (unsigned int i = 0 ; i < size; i++)
3370
3370
{
3371
3371
lua_pushnumber (tolua_S,i + 1 );
3372
3372
lua_gettable (tolua_S,2 );
@@ -3464,7 +3464,7 @@ int tolua_cocos2dx_DrawNode_drawCardinalSpline(lua_State* tolua_S)
3464
3464
ok &= luaval_to_color4f (tolua_S, 5 , &arg3, " cc.DrawNode:drawCardinalSpline" );
3465
3465
if (!ok)
3466
3466
return 0 ;
3467
- self->drawCardinalSpline (config, arg1, arg2, arg3);
3467
+ self->drawCardinalSpline (config, ( float ) arg1, arg2, arg3);
3468
3468
return 0 ;
3469
3469
}
3470
3470
luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d \n " , " cc.DrawNode:drawCardinalSpline" ,argc, 4 );
@@ -3574,7 +3574,7 @@ int tolua_cocos2dx_DrawNode_drawPoints(lua_State* tolua_S)
3574
3574
if (NULL == points)
3575
3575
return 0 ;
3576
3576
3577
- for (int i = 0 ; i < size; i++)
3577
+ for (unsigned int i = 0 ; i < size; i++)
3578
3578
{
3579
3579
lua_pushnumber (tolua_S,i + 1 );
3580
3580
lua_gettable (tolua_S,2 );
@@ -3614,7 +3614,7 @@ int tolua_cocos2dx_DrawNode_drawPoints(lua_State* tolua_S)
3614
3614
if (nullptr == points)
3615
3615
return 0 ;
3616
3616
3617
- for (int i = 0 ; i < size; i++)
3617
+ for (unsigned int i = 0 ; i < size; i++)
3618
3618
{
3619
3619
lua_pushnumber (tolua_S,i + 1 );
3620
3620
lua_gettable (tolua_S,2 );
@@ -6153,8 +6153,8 @@ static int lua_cocos2dx_Label_createWithTTF00(lua_State* L)
6153
6153
return 0 ;
6154
6154
6155
6155
6156
- int alignment = tolua_tonumber (L, 4 , 1 );
6157
- int lineSize = tolua_tonumber (L, 5 , 0 );
6156
+ int alignment = ( int ) tolua_tonumber (L, 4 , 1 );
6157
+ int lineSize = ( int ) tolua_tonumber (L, 5 , 0 );
6158
6158
cocos2d::Label* ret = cocos2d::Label::createWithTTF (ttfConfig, text, static_cast <TextHAlignment>(alignment), lineSize);
6159
6159
int ID = ret ? (int )(ret->_ID ) : -1 ;
6160
6160
int * luaID = ret ? &(ret->_luaID ) : nullptr ;
@@ -6197,7 +6197,7 @@ static int lua_cocos2dx_Label_createWithTTF01(lua_State* L)
6197
6197
{
6198
6198
std::string text = tolua_tostring (L, 2 , " " );
6199
6199
std::string fontFile = tolua_tostring (L, 3 , " " );
6200
- float fontSize = tolua_tonumber (L, 4 , 0 );
6200
+ float fontSize = ( float ) tolua_tonumber (L, 4 , 0 );
6201
6201
cocos2d::Size dimensions = cocos2d::Size::ZERO;
6202
6202
if (lua_istable (L, 5 ))
6203
6203
{
@@ -6420,7 +6420,7 @@ static int lua_cocos2dx_Console_addCommand(lua_State* tolua_S)
6420
6420
handler = ( toluafix_ref_function (tolua_S,3 ,0 ));
6421
6421
ScriptHandlerMgr::getInstance ()->addCustomHandler ((void *)cobj, handler);
6422
6422
6423
- struct Console ::Command outValue = {
6423
+ Console::Command outValue = {
6424
6424
name,
6425
6425
help,
6426
6426
[=](int fd, const std::string& args)
@@ -6642,7 +6642,7 @@ int lua_cocos2dx_TMXLayer_setTiles(lua_State* tolua_S)
6642
6642
return 0 ;
6643
6643
}
6644
6644
6645
- for (int i = 1 ; i <= len; i++)
6645
+ for (size_t i = 1 ; i <= len; i++)
6646
6646
{
6647
6647
arg0[i - 1 ] = (uint32_t )tolua_tofieldnumber (tolua_S, 2 , i, 0 );
6648
6648
}
@@ -7513,7 +7513,7 @@ int lua_cocos2dx_AutoPolygon_generatePolygon(lua_State* tolua_S)
7513
7513
tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_AutoPolygon_generatePolygon'" , nullptr );
7514
7514
return 0 ;
7515
7515
}
7516
- cocos2d::PolygonInfo* ret = new (std::nothrow) cocos2d::PolygonInfo (cocos2d::AutoPolygon::generatePolygon (arg0, arg1, arg2));
7516
+ cocos2d::PolygonInfo* ret = new (std::nothrow) cocos2d::PolygonInfo (cocos2d::AutoPolygon::generatePolygon (arg0, arg1, ( float ) arg2));
7517
7517
object_to_luaval<cocos2d::PolygonInfo>(tolua_S, " cc.PolygonInfo" ,(cocos2d::PolygonInfo*)ret);
7518
7518
tolua_register_gc (tolua_S,lua_gettop (tolua_S));
7519
7519
return 1 ;
@@ -7533,7 +7533,7 @@ int lua_cocos2dx_AutoPolygon_generatePolygon(lua_State* tolua_S)
7533
7533
tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_AutoPolygon_generatePolygon'" , nullptr );
7534
7534
return 0 ;
7535
7535
}
7536
- cocos2d::PolygonInfo* ret = new (std::nothrow) cocos2d::PolygonInfo (cocos2d::AutoPolygon::generatePolygon (arg0, arg1, arg2, arg3));
7536
+ cocos2d::PolygonInfo* ret = new (std::nothrow) cocos2d::PolygonInfo (cocos2d::AutoPolygon::generatePolygon (arg0, arg1, ( float ) arg2, ( float ) arg3));
7537
7537
object_to_luaval<cocos2d::PolygonInfo>(tolua_S, " cc.PolygonInfo" ,(cocos2d::PolygonInfo*)ret);
7538
7538
tolua_register_gc (tolua_S,lua_gettop (tolua_S));
7539
7539
return 1 ;
@@ -8255,7 +8255,7 @@ int tolua_cocos2d_Mat4_createRotationZ(lua_State* tolua_S)
8255
8255
ok &= luaval_to_mat4 (tolua_S, 1 , &mat);
8256
8256
if (!ok)
8257
8257
return 0 ;
8258
- angle = lua_tonumber (tolua_S, 2 );
8258
+ angle = ( float ) lua_tonumber (tolua_S, 2 );
8259
8259
cocos2d::Mat4::createRotationZ (angle, &mat);
8260
8260
mat4_to_luaval (tolua_S, mat);
8261
8261
return 1 ;
@@ -8785,7 +8785,7 @@ static int tolua_cocos2d_bytearray_intv(lua_State *L)
8785
8785
}
8786
8786
lua_pop (L, 1 );
8787
8787
lua_newtable (L);
8788
- for (auto idx = 0 ; idx < arg.size (); idx++)
8788
+ for (size_t idx = 0 ; idx < arg.size (); idx++)
8789
8789
{
8790
8790
lua_pushnumber (L, arg[idx]);
8791
8791
lua_rawseti (L, 1 , idx + 1 );
0 commit comments