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:
Jason Felds
2015-09-16 22:29:53 -04:00
parent b87af92a6b
commit cf545a3c01
3 changed files with 23 additions and 24 deletions
+5 -5
View File
@@ -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) \