X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da494b405d0826b343ea6d249bbac27061e11d3e..f5698096606b5a3d399018a20135f41d5ba05215:/src/motif/font.cpp diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 7c5b632029..0c82eed410 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -17,10 +17,13 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "font.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/defs.h" #ifdef __VMS @@ -137,7 +140,7 @@ wxXFont::~wxXFont() XmFontList fontList = (XmFontList) m_fontList; XmFontListFree (fontList); -#if wxCHECK_MOTIF_VERSION( 2, 0 ) +#if wxCHECK_MOTIF_VERSION( 2, 0 ) && !wxCHECK_LESSTIF() XmRenderTable renderTable = (XmRenderTable) m_renderTable; XmRenderTableFree (renderTable); #endif @@ -188,7 +191,7 @@ void wxFontRefData::Init(int pointSize, wxFontRefData::~wxFontRefData() { - wxList::Node* node = m_fonts.GetFirst(); + wxList::compatibility_iterator node = m_fonts.GetFirst(); while (node) { wxXFont* f = (wxXFont*) node->GetData(); @@ -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); } // ---------------------------------------------------------------------------- @@ -511,7 +514,7 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const int pointSize = (M_FONTDATA->m_pointSize * 10 * intScale) / 100; // search existing fonts first - wxList::Node* node = M_FONTDATA->m_fonts.GetFirst(); + wxList::compatibility_iterator node = M_FONTDATA->m_fonts.GetFirst(); while (node) { wxXFont* f = (wxXFont*) node->GetData();