EnableBuffering -> EnableReadBuffering
This commit is contained in:
@@ -205,7 +205,7 @@ int RageFileObj::Flush()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RageFileObj::EnableBuffering()
|
void RageFileObj::EnableReadBuffering()
|
||||||
{
|
{
|
||||||
if( m_pBuffer == NULL )
|
if( m_pBuffer == NULL )
|
||||||
m_pBuffer = new char[BSIZE];
|
m_pBuffer = new char[BSIZE];
|
||||||
@@ -241,7 +241,7 @@ int RageFileObj::GetLine( RString &sOut )
|
|||||||
if( m_bEOF )
|
if( m_bEOF )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
EnableBuffering();
|
EnableReadBuffering();
|
||||||
|
|
||||||
bool bGotData = false;
|
bool bGotData = false;
|
||||||
while( 1 )
|
while( 1 )
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ protected:
|
|||||||
virtual int WriteInternal( const void *pBuffer, size_t iBytes ) = 0;
|
virtual int WriteInternal( const void *pBuffer, size_t iBytes ) = 0;
|
||||||
virtual int FlushInternal() { return 0; }
|
virtual int FlushInternal() { return 0; }
|
||||||
|
|
||||||
void EnableBuffering();
|
void EnableReadBuffering();
|
||||||
|
|
||||||
void SetError( const RString &sError ) { m_sError = sError; }
|
void SetError( const RString &sError ) { m_sError = sError; }
|
||||||
RString m_sError;
|
RString m_sError;
|
||||||
@@ -115,7 +115,7 @@ private:
|
|||||||
* that buffering is only enabled if:
|
* that buffering is only enabled if:
|
||||||
*
|
*
|
||||||
* - GetLine() is called (which requires buffering to efficiently search for newlines);
|
* - GetLine() is called (which requires buffering to efficiently search for newlines);
|
||||||
* - or EnableBuffering() is called
|
* - or EnableReadBuffering() is called
|
||||||
*
|
*
|
||||||
* Once buffering is enabled, it stays enabled for the life of the object.
|
* Once buffering is enabled, it stays enabled for the life of the object.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user