remove Rewind()
This commit is contained in:
@@ -44,7 +44,6 @@ public:
|
||||
virtual int Read(void *buffer, size_t bytes);
|
||||
virtual int Write(const void *buffer, size_t bytes);
|
||||
virtual int Flush();
|
||||
virtual void Rewind();
|
||||
virtual int Seek( int offset );
|
||||
virtual RageFileObj *Copy( RageFile &p ) const;
|
||||
virtual CString GetDisplayPath() const { return path; }
|
||||
@@ -359,11 +358,6 @@ int RageFileObjDirect::Write( const void *buf, size_t bytes )
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void RageFileObjDirect::Rewind()
|
||||
{
|
||||
lseek( fd, 0, SEEK_SET );
|
||||
}
|
||||
|
||||
int RageFileObjDirect::Seek( int offset )
|
||||
{
|
||||
return lseek( fd, offset, SEEK_SET );
|
||||
|
||||
@@ -68,11 +68,6 @@ public:
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void Rewind()
|
||||
{
|
||||
m_iFilePos = 0;
|
||||
}
|
||||
|
||||
int Seek( int offset )
|
||||
{
|
||||
m_iFilePos = clamp( offset, 0, GetFileSize() );
|
||||
|
||||
@@ -83,7 +83,6 @@ public:
|
||||
~RageFileObjZipDeflated();
|
||||
int Read(void *buffer, size_t bytes);
|
||||
int Write(const void *buffer, size_t bytes) { SetError( "Not implemented" ); return -1; }
|
||||
void Rewind();
|
||||
int Seek( int offset );
|
||||
int GetFileSize() { return info.uncompr_size; }
|
||||
RageFileObj *Copy( RageFile &p ) const
|
||||
@@ -106,12 +105,6 @@ public:
|
||||
int Read(void *buffer, size_t bytes);
|
||||
int Write(const void *buffer, size_t bytes) { SetError( "Not implemented" ); return -1; }
|
||||
|
||||
void Rewind()
|
||||
{
|
||||
zip.Seek( info.data_offset );
|
||||
FilePos = 0;
|
||||
}
|
||||
|
||||
int Seek( int offset );
|
||||
int GetFileSize() { return info.uncompr_size; }
|
||||
|
||||
@@ -568,17 +561,6 @@ int RageFileObjZipDeflated::Read( void *buf, size_t bytes )
|
||||
return ret;
|
||||
}
|
||||
|
||||
void RageFileObjZipDeflated::Rewind()
|
||||
{
|
||||
inflateReset( &dstrm );
|
||||
decomp_buf_ptr = decomp_buf;
|
||||
decomp_buf_avail = 0;
|
||||
|
||||
zip.Seek( info.data_offset );
|
||||
CFilePos = 0;
|
||||
UFilePos = 0;
|
||||
}
|
||||
|
||||
int RageFileObjZipDeflated::Seek( int iPos )
|
||||
{
|
||||
/* Optimization: if offset is the end of the file, it's a lseek(0,SEEK_END). Don't
|
||||
|
||||
Reference in New Issue
Block a user