Remove the need for the RString buffer.
For most areas, the call to `c_str()` is plenty. For `RageUtil`, it's just a matter of new and delete.
This commit is contained in:
@@ -454,11 +454,11 @@ RString ReadString( RageFileBasic &f, int iSize, RString &sError )
|
||||
if( sError.size() != 0 )
|
||||
return RString();
|
||||
|
||||
RString sBuf;
|
||||
char *pBuf = sBuf.GetBuffer( iSize );
|
||||
FileReading::ReadBytes( f, pBuf, iSize, sError );
|
||||
sBuf.ReleaseBuffer( iSize );
|
||||
return sBuf;
|
||||
char *buf = new char[iSize];
|
||||
FileReading::ReadBytes( f, buf, iSize, sError );
|
||||
RString ret(buf);
|
||||
delete [] buf;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define FATAL_ERROR(s) \
|
||||
|
||||
Reference in New Issue
Block a user