Ignore:
Timestamp:
06/20/15 00:05:17 (10 years ago)
Author:
epyon
Message:
  • code compiles cleanly on maximum warning level
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/skeletal_mesh.cc

    r395 r406  
    1616{
    1717        const mesh_raw_channel* pnt_chan = a_mesh_data->get_channel<md5_vtx_pnt>();
    18         m_pntdata.assign( (const md5_vtx_pnt*)pnt_chan->data, pnt_chan->count );
     18        m_pntdata.assign( reinterpret_cast<const md5_vtx_pnt*>( pnt_chan->data ), pnt_chan->count );
    1919        m_bone_offset.resize( bones->get_count() );
    2020        m_transform.resize( bones->get_count() );
     
    3535        if ( a_anim )
    3636        {
    37                 skeletal_animation_entry_cpu * anim = (skeletal_animation_entry_cpu*)a_anim;
    38                 anim->update_skeleton( m_transform.data(), (float)a_anim_time );
     37                skeletal_animation_entry_cpu * anim = static_cast<skeletal_animation_entry_cpu*>( a_anim );
     38                anim->update_skeleton( m_transform.data(), static_cast<float>( a_anim_time ) );
    3939                {
    4040                        size_t skeleton_size = m_bone_offset.size();
     
    5151                                const md5_vtx_pntiw& vert = m_vtx_data[i];
    5252
    53                                 for ( size_t j = 0; j < 4; ++j )
     53                                for ( int j = 0; j < 4; ++j )
    5454                                {
    55                                         unsigned index = (unsigned)vert.boneindex[j];
     55                                        unsigned index = unsigned( vert.boneindex[j] );
    5656                                        float weight   = vert.boneweight[j];
    5757                                        const quat& orient      = m_transform[index].get_orientation();
     
    7171void nv::skeletal_animation_entry_cpu::update_skeleton( transform* skeleton, float time ) const
    7272{
    73         float frame_duration = 1000.f / (float)m_node_data->get_frame_rate();
     73        float frame_duration = 1000.f / static_cast<float>( m_node_data->get_frame_rate() );
    7474        float anim_duration = frame_duration * m_node_data->get_duration();
    7575        float new_time = fmodf( time, anim_duration ) * 0.001f;
     
    152152                if ( bi != bone_names.end() )
    153153                {
    154                         bone_id = (sint16)bi->second;
     154                        bone_id = sint16( bi->second );
    155155                }
    156156                m_bone_ids[n] = bone_id;
     
    207207        if ( m_bone_data && a_anim )
    208208        {
    209                 skeletal_animation_entry_gpu * anim = (skeletal_animation_entry_gpu*)a_anim;
     209                skeletal_animation_entry_gpu * anim = static_cast<skeletal_animation_entry_gpu*>( a_anim );
    210210                anim->prepare( m_bone_data );
    211211                anim->update_skeleton( m_transform, a_anim_time );
Note: See TracChangeset for help on using the changeset viewer.