* 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:
		| @@ -167,6 +167,8 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event)) | |||||||
|     textCtrl.WriteText( tmp ); |     textCtrl.WriteText( tmp ); | ||||||
|      |      | ||||||
|     textCtrl.WriteText( "\nReading from wxFileInputStream:\n" ); |     textCtrl.WriteText( "\nReading from wxFileInputStream:\n" ); | ||||||
|  |  | ||||||
|  |     file_output.OutputStreamBuffer()->FlushBuffer(); | ||||||
|      |      | ||||||
|     wxFileInputStream file_input( "test_wx.dat" ); |     wxFileInputStream file_input( "test_wx.dat" ); | ||||||
|      |      | ||||||
|   | |||||||
| @@ -90,6 +90,9 @@ wxString wxDataInputStream::ReadLine() | |||||||
|  |  | ||||||
|   while (!end_line) { |   while (!end_line) { | ||||||
|     c = GetC(); |     c = GetC(); | ||||||
|  |     if (LastError() != wxStream_NOERROR) | ||||||
|  |       break; | ||||||
|  |  | ||||||
|     switch (c) { |     switch (c) { | ||||||
|     case '\n': |     case '\n': | ||||||
|       end_line = TRUE; |       end_line = TRUE; | ||||||
| @@ -201,4 +204,4 @@ void wxDataOutputStream::WriteDouble(double d) | |||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   // wxUSE_STREAMS |   // wxUSE_STREAMS | ||||||
|    |    | ||||||
|   | |||||||
| @@ -648,7 +648,7 @@ wxInputStream& wxInputStream::operator>>(signed long& i) | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   while (isdigit(c)) { |   while (isdigit(c)) { | ||||||
|     i = i*10 + c; |     i = i*10 + (c - (int)'0'); | ||||||
|     c = GetC(); |     c = GetC(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -690,7 +690,7 @@ wxInputStream& wxInputStream::operator>>(unsigned long& i) | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   while (isdigit(c)) { |   while (isdigit(c)) { | ||||||
|     i = i*10 + c; |     i = i*10 + c - '0'; | ||||||
|     c = GetC(); |     c = GetC(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user