X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90e4fb5d04b9d33a53b67b68eca832dfcfee9ae0..ca1f7cb56322e35a5bf3d9612cd14c128246947c:/src/common/imagxpm.cpp 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