X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/common/imagxpm.cpp?ds=sidebyside diff --git a/src/common/imagxpm.cpp b/src/common/imagxpm.cpp index aa511c7359..3db566fcb7 100644 --- a/src/common/imagxpm.cpp +++ b/src/common/imagxpm.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imagxpm.cpp +// Name: src/common/imagxpm.cpp // Purpose: wxXPMHandler // Author: Vaclav Slavik, Robert Roebling // RCS-ID: $Id$ @@ -66,20 +66,19 @@ license is as follows: #include "wx/wxprec.h" #ifdef __BORLANDC__ -# pragma hdrstop + #pragma hdrstop #endif +#if wxUSE_XPM + #ifndef WX_PRECOMP -# include "wx/defs.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/utils.h" #endif -#if wxUSE_XPM - #include "wx/imagxpm.h" #include "wx/wfstream.h" -#include "wx/log.h" -#include "wx/intl.h" -#include "wx/utils.h" #include "wx/xpmdecod.h" IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler) @@ -145,7 +144,7 @@ bool wxXPMHandler::SaveFile(wxImage * image, sName << wxT("_xpm"); } - if ( !sName.IsEmpty() ) + if ( !sName.empty() ) sName = wxString(wxT("/* XPM */\nstatic char *")) + sName; else sName = wxT("/* XPM */\nstatic char *xpm_data"); @@ -211,7 +210,7 @@ bool wxXPMHandler::SaveFile(wxImage * image, } tmp = wxT("/* pixels */\n"); - stream.Write( (const char*) tmp.ToAscii(), tmp.Length() ); + stream.Write( (const char*) tmp.ToAscii(), tmp.length() ); unsigned char *data = image->GetData(); for (j = 0; j < image->GetHeight(); j++)