conform to new wxTextInputStream >> wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
wxTextInputStream text_stream(stream);
|
||||||
|
|
||||||
if (stream.Peek()==wxT('#'))
|
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;
|
wxUint32 width, height;
|
||||||
wxUint16 maxval;
|
wxUint16 maxval;
|
||||||
wxString line;
|
|
||||||
char c(0);
|
char c(0);
|
||||||
|
|
||||||
image->Destroy();
|
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);
|
Skip_Comment(buf_stream);
|
||||||
text_stream >> width >> height ;
|
text_stream >> width >> height ;
|
||||||
Skip_Comment(buf_stream);
|
Skip_Comment(buf_stream);
|
||||||
|
Reference in New Issue
Block a user