X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/995612e2abc1131458863ed1d3e55206df7c33de..270a909e20a2c652fd816ad14407113ad0319c9d:/src/common/imagpnm.cpp diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index 3447c16544..ec9edd90b1 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -41,21 +41,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNMHandler,wxImageHandler) void Skip_Comment(wxInputStream &stream) { - wxString line; wxTextInputStream text_stream(stream); if (stream.Peek()==wxT('#')) { - text_stream >> line; + text_stream.ReadLine(); Skip_Comment(stream); } } -bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose) ) +bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose), int WXUNUSED(index) ) { wxUint32 width, height; wxUint16 maxval; - wxString line; char c(0); image->Destroy(); @@ -84,7 +82,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE 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);