Fix minor windows pedantic warnings.
This commit is contained in:
+10
-2
@@ -881,7 +881,7 @@ void split( const wstring &sSource, const wstring &sDelimitor, vector<wstring> &
|
||||
|
||||
RString str="a,b,c";
|
||||
int start = 0, size = -1;
|
||||
while( 1 )
|
||||
for(;;)
|
||||
{
|
||||
do_split( str, ",", start, size );
|
||||
if( start == str.size() )
|
||||
@@ -2379,24 +2379,30 @@ bool FileCopy( const RString &sSrcFile, const RString &sDstFile )
|
||||
|
||||
bool FileCopy( RageFileBasic &in, RageFileBasic &out, RString &sError, bool *bReadError )
|
||||
{
|
||||
while(1)
|
||||
for(;;)
|
||||
{
|
||||
RString data;
|
||||
if( in.Read(data, 1024*32) == -1 )
|
||||
{
|
||||
sError = ssprintf( "read error: %s", in.GetError().c_str() );
|
||||
if( bReadError != NULL )
|
||||
{
|
||||
*bReadError = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if( data.empty() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
int i = out.Write(data);
|
||||
if( i == -1 )
|
||||
{
|
||||
sError = ssprintf( "write error: %s", out.GetError().c_str() );
|
||||
if( bReadError != NULL )
|
||||
{
|
||||
*bReadError = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2405,7 +2411,9 @@ bool FileCopy( RageFileBasic &in, RageFileBasic &out, RString &sError, bool *bRe
|
||||
{
|
||||
sError = ssprintf( "write error: %s", out.GetError().c_str() );
|
||||
if( bReadError != NULL )
|
||||
{
|
||||
*bReadError = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user