- Timestamp:
- 02/17/15 05:54:44 (10 years ago)
- Location:
- trunk
- Files:
-
- 20 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/core/string.hh
r319 r352 210 210 } 211 211 212 inline std::string extract_extension( const std::string& filename ) 213 { 214 size_t lastdot = filename.find_last_of( "." ); 215 std::string ext; 216 if ( std::string::npos != lastdot ) 217 ext = filename.substr( lastdot + 1 ); 218 std::transform( ext.begin(), ext.end(), ext.begin(), ::tolower ); 219 return ext; 220 } 221 212 222 inline std::string remove_chars_copy( std::string s, const std::string& chars ) 213 223 { -
trunk/src/formats/md3_loader.cc
r323 r352 204 204 source.read( md3->frames, sizeof( md3_frame_t ), static_cast<size_t>( md3->header.num_frames ) ); 205 205 206 source.seek( md3->header.ofs_tags, origin::SET ); 207 source.read( md3->tags, sizeof( md3_tag_t ), static_cast<size_t>( md3->header.num_tags * md3->header.num_frames ) ); 206 if ( md3->header.num_tags > 0 ) 207 { 208 source.seek( md3->header.ofs_tags, origin::SET ); 209 source.read( md3->tags, sizeof( md3_tag_t ), static_cast<size_t>( md3->header.num_tags * md3->header.num_frames ) ); 210 } 208 211 209 212 source.seek( md3->header.ofs_surfaces, origin::SET );
Note: See TracChangeset
for help on using the changeset viewer.