* 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:
@@ -168,6 +168,8 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
textCtrl.WriteText( "\nReading from wxFileInputStream:\n" );
|
||||
|
||||
file_output.OutputStreamBuffer()->FlushBuffer();
|
||||
|
||||
wxFileInputStream file_input( "test_wx.dat" );
|
||||
|
||||
file_input >> si;
|
||||
|
@@ -90,6 +90,9 @@ wxString wxDataInputStream::ReadLine()
|
||||
|
||||
while (!end_line) {
|
||||
c = GetC();
|
||||
if (LastError() != wxStream_NOERROR)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case '\n':
|
||||
end_line = TRUE;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user