- Timestamp:
- 08/17/13 21:22:56 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/md2_loader.cc
r200 r204 357 357 uint32 stats_collision = 0; 358 358 359 std::vector< sint32 > index_translation( md2->header.num_vertices, -1 );359 std::vector< sint32 > index_translation( static_cast< uint32 >( md2->header.num_vertices ), -1 ); 360 360 361 361 m_new_indexes.clear(); -
trunk/src/formats/obj_loader.cc
r198 r204 130 130 }; 131 131 132 s td::size_t mesh_obj_reader::add_face( uint32* vi, uint32* ti, uint32* ni, size_t count )132 size_t mesh_obj_reader::add_face( uint32* vi, uint32* ti, uint32* ni, size_t count ) 133 133 { 134 134 if ( count < 3 ) … … 181 181 std::vector< vec4 >& tg = m_tangent->get(); 182 182 183 s td::size_t count = vp.size();184 s td::size_t tcount = count / 3;183 size_t count = vp.size(); 184 size_t tcount = count / 3; 185 185 186 186 std::vector< vec3 > tan1( count ); … … 188 188 tg.resize( count ); 189 189 190 for (s td::size_t a = 0; a < tcount; ++a )191 { 192 uint32i1 = a * 3;193 uint32i2 = a * 3 + 1;194 uint32i3 = a * 3 + 2;190 for (size_t a = 0; a < tcount; ++a ) 191 { 192 size_t i1 = a * 3; 193 size_t i2 = a * 3 + 1; 194 size_t i3 = a * 3 + 2; 195 195 196 196 // TODO: simplify -
trunk/src/gfx/keyframed_mesh.cc
r183 r204 58 58 } 59 59 60 uint32keyframed_mesh::get_max_frames() const60 size_t keyframed_mesh::get_max_frames() const 61 61 { 62 62 return m_data->get_frame_count(); … … 122 122 void nv::keyframed_mesh::draw( render_state& rstate ) 123 123 { 124 nv::uint32vtx_count = m_data->get_vertex_count();124 size_t vtx_count = m_data->get_vertex_count(); 125 125 if ( m_gpu_last_frame != m_last_frame ) 126 126 { -
trunk/src/gl/gl_texture2d.cc
r160 r204 44 44 void nv::gl_texture2d::bind( size_t slot ) 45 45 { 46 glActiveTexture( GL_TEXTURE0 + s lot);46 glActiveTexture( GL_TEXTURE0 + static_cast< GLenum >( slot ) ); 47 47 glBindTexture( GL_TEXTURE_2D, m_name.get_value() ); 48 48 } -
trunk/src/gui/gui_style.cc
r121 r204 48 48 lua::stack_guard guard( m_lua ); 49 49 if ( !resolve( e, entry, LUA_TNUMBER ) ) return false; 50 i = lua_tointeger( m_lua, -1);50 i = static_cast< int >( lua_tointeger( m_lua, -1 ) ); 51 51 return true; 52 52 } -
trunk/src/lib/gl.cc
r170 r204 37 37 *(void **) (&ext_loader) = gl_library.get("wglGetProcAddress"); 38 38 # define NV_GL_LOAD_EXT( symbol ) *(void **) (&symbol) = ext_loader(#symbol); 39 # elif NV_PLATFORM == NV_LINUX39 # elif (NV_PLATFORM == NV_LINUX || NV_PLATFORM == NV_APPLE) 40 40 # define NV_GL_LOAD( symbol ) *(void **) (&symbol) = gl_library.get(#symbol); 41 41 *(void **) (&ext_loader) = gl_library.get("glXGetProcAddress"); -
trunk/src/logger.cc
r121 r204 229 229 #if NV_PLATFORM == NV_WINDOWS 230 230 m_handle = GetStdHandle( STD_OUTPUT_HANDLE ); 231 #else 232 NV_UNUSED( m_handle ); 231 233 #endif 232 234 } -
trunk/src/lua/lua_area.cc
r198 r204 194 194 static int nlua_area_corners_closure( lua_State* L ) 195 195 { 196 int index = lua_tointeger( L, lua_upvalueindex(2) ) + 1;196 int index = static_cast< int >( lua_tointeger( L, lua_upvalueindex(2) ) + 1 ); 197 197 lua_pushinteger( L, index ); 198 198 lua_replace( L, lua_upvalueindex(2) ); // update … … 223 223 { 224 224 nv::rectangle* a = nlua_to_parea( L, 1 ); 225 a->shrink( lua_tointeger( L, 2) );225 a->shrink( static_cast< int >( lua_tointeger( L, 2 ) ) ); 226 226 return 0; 227 227 } … … 230 230 { 231 231 nv::rectangle* a = nlua_to_parea( L, 1 ); 232 nlua_push_area( L, a->shrinked( lua_tointeger( L, 2) ) );232 nlua_push_area( L, a->shrinked( static_cast< int >( lua_tointeger( L, 2 ) ) ) ); 233 233 return 1; 234 234 } … … 237 237 { 238 238 nv::rectangle* a = nlua_to_parea( L, 1 ); 239 a->expand( lua_tointeger( L, 2) );239 a->expand( static_cast< int >( lua_tointeger( L, 2 ) ) ); 240 240 return 0; 241 241 } … … 244 244 { 245 245 nv::rectangle* a = nlua_to_parea( L, 1 ); 246 nlua_push_area( L, a->expanded( lua_tointeger( L, 2) ) );246 nlua_push_area( L, a->expanded( static_cast< int >( lua_tointeger( L, 2 ) ) ) ); 247 247 return 1; 248 248 } … … 327 327 { 328 328 nv::ivec2 c = nlua_to_coord( L, 1 ); 329 int amount = lua_tointeger( L, 1);329 int amount = static_cast< int >( lua_tointeger( L, 1 ) ); 330 330 nv::ivec2 shift( amount, amount ); 331 331 nlua_push_area( L, nv::rectangle( c - shift, c + shift ) ); -
trunk/src/lua/lua_aux.cc
r198 r204 91 91 static int nluaaux_math_dieroll( lua_State* L ) 92 92 { 93 intdice = luaL_checkinteger( L, 1 );94 intsides = luaL_checkinteger( L, 2 );93 lua_Integer dice = luaL_checkinteger( L, 1 ); 94 lua_Integer sides = luaL_checkinteger( L, 2 ); 95 95 if ( dice < 1 ) luaL_argerror( L, 1, "die count lower than 1!" ); 96 96 if ( sides < 1 ) luaL_argerror( L, 2, "side count lower than 1!" ); … … 109 109 if ( lua_gettop( L ) == 1 ) 110 110 { 111 intarg1 = luaL_checkinteger( L, 1 );111 lua_Integer arg1 = luaL_checkinteger( L, 1 ); 112 112 if ( arg1 < 1 ) arg1 = 1; 113 113 lua_pushunsigned( L, nv::random::get().urange( 1, static_cast<nv::uint32>( arg1 ) ) ); … … 115 115 else 116 116 { 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 ) ); 119 119 if (arg2 < arg1) std::swap( arg2, arg1 ); 120 120 lua_pushinteger( L, nv::random::get().srange( arg1, arg2 ) ); -
trunk/src/lua/lua_path.cc
r198 r204 44 44 } 45 45 46 void lua::path::push( uint32e )46 void lua::path::push( size_t e ) 47 47 { 48 48 m_elements[ m_count ].value = e; … … 51 51 } 52 52 53 void lua::path::push( uint32 start, uint32length )53 void lua::path::push( size_t start, size_t length ) 54 54 { 55 55 m_elements[ m_count ].value = start; … … 58 58 } 59 59 60 void lua::path::push( const char* p, uint32length )60 void lua::path::push( const char* p, size_t length ) 61 61 { 62 62 m_elements[ m_count ].value = m_path.length(); … … 66 66 } 67 67 68 void lua::path::push( const std::string& s, uint32length )68 void lua::path::push( const std::string& s, size_t length ) 69 69 { 70 70 m_elements[ m_count ].value = m_path.length(); -
trunk/src/lua/lua_state.cc
r198 r204 249 249 { 250 250 lua_getfield( L->L, -1, element.c_str() ); 251 intresult = lua_type( L->L, -1 ) == LUA_TNUMBER ? lua_tointeger( L->L, -1 ) : defval;252 lua_pop( L->L, 1 ); 253 return result;251 lua_Integer result = lua_type( L->L, -1 ) == LUA_TNUMBER ? lua_tointeger( L->L, -1 ) : defval; 252 lua_pop( L->L, 1 ); 253 return static_cast< int >( result ); 254 254 } 255 255
Note: See TracChangeset
for help on using the changeset viewer.