Changeset 374 for trunk/src/formats


Ignore:
Timestamp:
05/26/15 17:35:06 (10 years ago)
Author:
epyon
Message:
  • MASSIVE commit
  • common.hh - size_t, ptrdiff_t, nv:: namespace, NV_ALIGN_OF and basic template tools
  • STL - algorithm.hh, iterator.hh, limits.hh, numeric.hh and type_info.hh
  • STL - updates to memory, array and string
Location:
trunk/src/formats
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/formats/md2_loader.cc

    r367 r374  
    238238}
    239239
    240 size_t md2_loader::get_max_frames() const
     240nv::size_t md2_loader::get_max_frames() const
    241241{
    242242        return static_cast< size_t >( ((md2_t*)m_md2)->header.num_frames );
  • trunk/src/formats/md3_loader.cc

    r367 r374  
    172172        source.read( surface->vertices, sizeof( md3_vertex_t ), static_cast<size_t>( surface->header.num_verts * surface->header.num_frames ) );
    173173
    174         if ( source.tell() != static_cast<std::size_t>( pos + surface->header.ofs_end ) ) return false;
     174        if ( source.tell() != static_cast<size_t>( pos + surface->header.ofs_end ) ) return false;
    175175
    176176        return true;
  • trunk/src/formats/md5_loader.cc

    r367 r374  
    344344                vtc.tangent  = glm::vec3(0);
    345345
    346                 std::sort( weights + start_weight, weights + start_weight + weight_count, [](const md5_weight& a, const md5_weight& b) -> bool { return a.bias > b.bias; } );
     346                stable_sort( weights + start_weight, weights + start_weight + weight_count, [] ( const md5_weight& a, const md5_weight& b ) -> bool { return a.bias > b.bias; } );
     347                //std::sort( weights + start_weight, weights + start_weight + weight_count, [](const md5_weight& a, const md5_weight& b) -> bool { return a.bias > b.bias; } );
    347348
    348349                if ( weight_count > 4 )
  • trunk/src/formats/obj_loader.cc

    r319 r374  
    5353        std::string next_name;
    5454
    55         std::size_t size;
    56         bool        eof;
     55        size_t size;
     56        bool   eof;
    5757
    5858        obj_reader();
     
    172172{
    173173        mesh_data_reader( bool normals ) : m_normals( normals ) {}
    174         virtual std::size_t add_face( uint32* vi, uint32* ti, uint32* ni, size_t count )
     174        virtual size_t add_face( uint32* vi, uint32* ti, uint32* ni, size_t count )
    175175        {
    176176                if ( count < 3 ) return 0; // TODO : report error?
     
    178178                // TODO : support if normals not present;
    179179                vec3 nullvec;
    180                 std::size_t result = 0;
     180                size_t result = 0;
    181181                // Simple triangulation - obj's shouldn't have more than quads anyway
    182182
     
    278278                }
    279279
    280                 for (std::size_t a = 0; a < count; ++a )
     280                for (size_t a = 0; a < count; ++a )
    281281                {
    282282                        const vec3& n = m_data[a].normal;
Note: See TracChangeset for help on using the changeset viewer.