X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90e4fb5d04b9d33a53b67b68eca832dfcfee9ae0..af58844636f51ca9c9350c66de3baf427d3e8646:/src/common/imagxpm.cpp?ds=sidebyside diff --git a/src/common/imagxpm.cpp b/src/common/imagxpm.cpp index 5aa6dded43..2850e770e6 100644 --- a/src/common/imagxpm.cpp +++ b/src/common/imagxpm.cpp @@ -80,6 +80,7 @@ license is as follows: #include "wx/imagxpm.h" #include "wx/wfstream.h" #include "wx/xpmdecod.h" +#include "wx/filename.h" IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler) @@ -123,8 +124,8 @@ bool wxXPMHandler::SaveFile(wxImage * image, wxString sName; if ( image->HasOption(wxIMAGE_OPTION_FILENAME) ) { - wxSplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME), - NULL, &sName, NULL); + wxFileName::SplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME), + NULL, &sName, NULL); sName << wxT("_xpm"); } @@ -217,6 +218,7 @@ bool wxXPMHandler::DoCanRead(wxInputStream& stream) { wxXPMDecoder decoder; return decoder.CanRead(stream); + // it's ok to modify the stream position here } #endif // wxUSE_STREAMS