]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/font.cpp
harmless warning fixes for WinCE (mostly unused parameters)
[wxWidgets.git] / src / os2 / font.cpp
index 52e3ec4d2e103970e2424eacaa661b8b8a267af6..517053a9155ed3e5f432b5636608b87a32ff20b9 100644 (file)
@@ -376,8 +376,6 @@ bool wxFontRefData::Alloc(
     wxString                        sFaceName;
     long                            flId = m_hFont;
     long                            lRc;
-    short                           nIndex = 0;
-    PFONTMETRICS                    pFM = NULL;
     ERRORID                         vError;
     wxString                        sError;
 
@@ -1140,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
 
 //