]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagxpm.cpp
Added pango_context_get_language to speed up pango_context_get_metrics
[wxWidgets.git] / src / common / imagxpm.cpp
index 7da5a26011e57b88f24156c35808313d489d6928..3db566fcb741be9ef7a95f4ace6c5269a3e3d359 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        imagxpm.cpp
+// Name:        src/common/imagxpm.cpp
 // Purpose:     wxXPMHandler
 // Author:      Vaclav Slavik, Robert Roebling
 // RCS-ID:      $Id$
@@ -62,28 +62,23 @@ license is as follows:
 %
 */
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "imagxpm.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #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)
@@ -149,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");
@@ -180,7 +175,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
 
     // 2b. generate colour table:
     for (wxImageHistogram::iterator entry = histogram.begin();
-         entry != histogram.end(); entry++ )
+         entry != histogram.end(); ++entry )
     {
         unsigned long index = entry->second.index;
         symbols[index] = symbols_data + index * (chars_per_pixel+1);
@@ -215,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++)