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/io/c_stream.cc

    r395 r406  
    3131        if ( m_file )
    3232        {
    33                 ::fclose( (FILE*)m_file );
     33                ::fclose( reinterpret_cast<FILE*>( m_file ) );
    3434        }
    3535}
     
    3838{
    3939        NV_ASSERT( buffer != nullptr && size != 0 && count != 0, "Bad parameter passed to read!" );
    40         return m_file ? ::fread( buffer, size, count, (FILE*)m_file ) : 0;
     40        return m_file ? ::fread( buffer, size, count, reinterpret_cast<FILE*>( m_file ) ) : 0;
    4141}
    4242
     
    4444{
    4545        NV_ASSERT( buffer != nullptr && size != 0 && count != 0, "Bad parameter passed to write!" );
    46         return m_file ? ::fwrite( buffer, size, count, (FILE*)m_file ) : 0;
     46        return m_file ? ::fwrite( buffer, size, count, reinterpret_cast<FILE*>( m_file ) ) : 0;
    4747}
    4848
    4949bool c_stream::seek( long offset, origin orig )
    5050{
    51         return m_file != nullptr && ( ::fseek( (FILE*)m_file, (long)offset, static_cast<int>(orig) ) == 0 );
     51        return m_file != nullptr && ( ::fseek( reinterpret_cast<FILE*>( m_file ), offset, static_cast<int>(orig) ) == 0 );
    5252}
    5353
    5454nv::size_t c_stream::tell()
    5555{
    56         return m_file != nullptr ? static_cast< nv::size_t >( ::ftell( (FILE*)m_file ) ) : 0;
     56        return m_file != nullptr ? static_cast< nv::size_t >( ::ftell( reinterpret_cast<FILE*>( m_file ) ) ) : 0;
    5757}
    5858
     
    7272                        return 0;
    7373                }
    74                 m_file_size = (size_t) (fstat.st_size);                 
     74                m_file_size = static_cast<size_t>(fstat.st_size);               
    7575        }
    7676
     
    8282        if ( m_file != nullptr )
    8383        {
    84                 ::fflush( (FILE*)m_file );
     84                ::fflush( reinterpret_cast<FILE*>( m_file ) );
    8585        }
    8686}
Note: See TracChangeset for help on using the changeset viewer.