fixed Sun CC warning about local variable read hiding wxStreamBuffer::read
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -376,14 +376,14 @@ size_t wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
if ( m_stream )
|
if ( m_stream )
|
||||||
m_stream->Reset();
|
m_stream->Reset();
|
||||||
|
|
||||||
size_t read;
|
size_t readBytes;
|
||||||
if ( !HasBuffer() )
|
if ( !HasBuffer() )
|
||||||
{
|
{
|
||||||
wxInputStream *inStream = GetInputStream();
|
wxInputStream *inStream = GetInputStream();
|
||||||
|
|
||||||
wxCHECK_MSG( inStream, 0, _T("should have a stream in wxStreamBuffer") );
|
wxCHECK_MSG( inStream, 0, _T("should have a stream in wxStreamBuffer") );
|
||||||
|
|
||||||
read = inStream->OnSysRead(buffer, size);
|
readBytes = inStream->OnSysRead(buffer, size);
|
||||||
}
|
}
|
||||||
else // we have a buffer, use it
|
else // we have a buffer, use it
|
||||||
{
|
{
|
||||||
@@ -414,13 +414,13 @@ size_t wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
read = orig_size - size;
|
readBytes = orig_size - size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_stream )
|
if ( m_stream )
|
||||||
m_stream->m_lastcount = read;
|
m_stream->m_lastcount = readBytes;
|
||||||
|
|
||||||
return read;
|
return readBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this should really be called "Copy()"
|
// this should really be called "Copy()"
|
||||||
@@ -1279,5 +1279,4 @@ wxOutputStream& wxEndL(wxOutputStream& stream)
|
|||||||
return stream.Write(eol, wxStrlen(eol));
|
return stream.Write(eol, wxStrlen(eol));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // wxUSE_STREAMS
|
||||||
// wxUSE_STREAMS
|
|
||||||
|
Reference in New Issue
Block a user