]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/font.cpp
unused variable warning fix (patch 923094)
[wxWidgets.git] / src / motif / font.cpp
index dd3de8f55a8fff0c3d4bba6ba129c8cfb28ecd09..06637b118da1623a8c2bb1283f204ce874b5bc5e 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "font.h"
 #endif
 
@@ -485,14 +485,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);
 }
 
 // ----------------------------------------------------------------------------