* wxStream fixes (integer/line parsing).
* Typetest sample fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c693edf3bc
commit
b6bff3019e
@ -167,6 +167,8 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
|
||||
textCtrl.WriteText( tmp );
|
||||
|
||||
textCtrl.WriteText( "\nReading from wxFileInputStream:\n" );
|
||||
|
||||
file_output.OutputStreamBuffer()->FlushBuffer();
|
||||
|
||||
wxFileInputStream file_input( "test_wx.dat" );
|
||||
|
||||
|
@ -90,6 +90,9 @@ wxString wxDataInputStream::ReadLine()
|
||||
|
||||
while (!end_line) {
|
||||
c = GetC();
|
||||
if (LastError() != wxStream_NOERROR)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case '\n':
|
||||
end_line = TRUE;
|
||||
@ -201,4 +204,4 @@ void wxDataOutputStream::WriteDouble(double d)
|
||||
|
||||
#endif
|
||||
// wxUSE_STREAMS
|
||||
|
||||
|
||||
|
@ -648,7 +648,7 @@ wxInputStream& wxInputStream::operator>>(signed long& i)
|
||||
}
|
||||
|
||||
while (isdigit(c)) {
|
||||
i = i*10 + c;
|
||||
i = i*10 + (c - (int)'0');
|
||||
c = GetC();
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ wxInputStream& wxInputStream::operator>>(unsigned long& i)
|
||||
}
|
||||
|
||||
while (isdigit(c)) {
|
||||
i = i*10 + c;
|
||||
i = i*10 + c - '0';
|
||||
c = GetC();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user