Ignore:
Timestamp:
08/17/13 21:22:56 (12 years ago)
Author:
cahir
Message:

Fix warnings on MacOSX 64-bit with clang 3.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua_aux.cc

    r198 r204  
    9191static int nluaaux_math_dieroll( lua_State* L )
    9292{
    93         int dice  = luaL_checkinteger( L,  1 );
    94         int sides = luaL_checkinteger( L,  2 );
     93        lua_Integer dice  = luaL_checkinteger( L,  1 );
     94        lua_Integer sides = luaL_checkinteger( L,  2 );
    9595        if ( dice < 1 )  luaL_argerror( L, 1, "die count lower than 1!" );
    9696        if ( sides < 1 ) luaL_argerror( L, 2, "side count lower than 1!" );
     
    109109                if ( lua_gettop( L ) == 1 )
    110110                {
    111                         int arg1 = luaL_checkinteger( L, 1 );
     111                        lua_Integer arg1 = luaL_checkinteger( L, 1 );
    112112                        if ( arg1 < 1 ) arg1 = 1;
    113113                        lua_pushunsigned( L, nv::random::get().urange( 1, static_cast<nv::uint32>( arg1 ) ) );
     
    115115                else
    116116                {
    117                         int arg1 = luaL_checkinteger( L, 1 );
    118                         int arg2 = luaL_checkinteger( L, 2 );
     117                        int arg1 = static_cast< int >( luaL_checkinteger( L, 1 ) );
     118                        int arg2 = static_cast< int >( luaL_checkinteger( L, 2 ) );
    119119                        if (arg2 < arg1) std::swap( arg2, arg1 );
    120120                        lua_pushinteger( L, nv::random::get().srange( arg1, arg2 ) );
Note: See TracChangeset for help on using the changeset viewer.