X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24f9edfdae97396b0159f86eec86d002d338d062..aa99e0cd2242db04fe1f9bb7d91aea545def2422:/src/motif/font.cpp diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 4e7186a805..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 @@ -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();