]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagpnm.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / common / imagpnm.cpp
index 3447c165446cf7d5d55728f383bf6624544c85dc..c2ed7bf13c9629789129a8159bc3576251980247 100644 (file)
@@ -41,12 +41,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNMHandler,wxImageHandler)
 
 void Skip_Comment(wxInputStream &stream)
 {
 
 void Skip_Comment(wxInputStream &stream)
 {
-  wxString line;
   wxTextInputStream text_stream(stream);
 
   if (stream.Peek()==wxT('#'))
     {
   wxTextInputStream text_stream(stream);
 
   if (stream.Peek()==wxT('#'))
     {
-      text_stream >> line;
+      text_stream.ReadLine();
       Skip_Comment(stream);
     }
 }
       Skip_Comment(stream);
     }
 }
@@ -55,7 +54,6 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE
 {
     wxUint32  width, height;
     wxUint16  maxval;
 {
     wxUint32  width, height;
     wxUint16  maxval;
-    wxString  line;
     char      c(0);
 
     image->Destroy();
     char      c(0);
 
     image->Destroy();
@@ -84,7 +82,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE
         return FALSE;
       }
 
         return FALSE;
       }
 
-    text_stream >> line; // for the \n
+    text_stream.ReadLine(); // for the \n
     Skip_Comment(buf_stream);
     text_stream >> width >> height ;
     Skip_Comment(buf_stream);
     Skip_Comment(buf_stream);
     text_stream >> width >> height ;
     Skip_Comment(buf_stream);