]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/font.cpp
(blind) fix for gcc 3.4 warning for an always true comparison in an assert
[wxWidgets.git] / src / motif / font.cpp
index c4c0f9fcd6286d17eea3295d47f8f507da105d06..0c82eed410a31493c00b002cc07afe7baffeb078 100644 (file)
@@ -21,6 +21,9 @@
     #pragma implementation "font.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #ifdef __VMS
@@ -485,14 +488,14 @@ wxFontEncoding wxFont::GetEncoding() const
     return M_FONTDATA->m_encoding;
 }
 
-wxNativeFontInfo *wxFont::GetNativeFontInfo() const
+const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
 {
     wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
 
     if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty())
         GetInternalFont();
 
-    return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
+    return &(M_FONTDATA->m_nativeFontInfo);
 }
 
 // ----------------------------------------------------------------------------