X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b75810c8d1099abc9692d81e059a3a90afcbdcc..132422c4b93a0fe5d4f313350adf2c13423c07ac:/src/os2/font.cpp diff --git a/src/os2/font.cpp b/src/os2/font.cpp index 5ada2e0801..517053a915 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -28,12 +28,14 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/font.h" + #include "wx/log.h" #endif // WX_PRECOMP #include "wx/os2/private.h" #include "wx/fontutil.h" #include "wx/fontmap.h" +#include "wx/encinfo.h" #include "wx/tokenzr.h" @@ -374,8 +376,6 @@ bool wxFontRefData::Alloc( wxString sFaceName; long flId = m_hFont; long lRc; - short nIndex = 0; - PFONTMETRICS pFM = NULL; ERRORID vError; wxString sError; @@ -1072,7 +1072,7 @@ void wxFont::SetEncoding( RealizeResource(); } // end of wxFont::SetEncoding -void wxFont::SetNativeFontInfo( +void wxFont::DoSetNativeFontInfo( const wxNativeFontInfo& rInfo ) { @@ -1138,11 +1138,10 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->GetEncoding(); } // end of wxFont::GetEncoding -wxNativeFontInfo* wxFont::GetNativeFontInfo() const +const wxNativeFontInfo* wxFont::GetNativeFontInfo() const { - if (M_FONTDATA->HasNativeFontInfo()) - return new wxNativeFontInfo(M_FONTDATA->GetNativeFontInfo()); - return 0; + return M_FONTDATA->HasNativeFontInfo() ? &(M_FONTDATA->GetNativeFontInfo()) + : NULL; } // end of wxFont::GetNativeFontInfo //