]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontutil.cpp
reactivate commented out method
[wxWidgets.git] / src / unix / fontutil.cpp
index 39554c0fff1cdd2440ea84c5f8dafcf2066fbce6..8a0fbb21939b403c4c36f496a437fc9906112874 100644 (file)
@@ -581,8 +581,7 @@ wxString wxNativeFontInfo::GetXFontComponent(wxXLFDField field) const
 
     if ( !HasElements() )
     {
-        // const_cast
-        if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) )
+        if ( !const_cast<wxNativeFontInfo *>(this)->FromXFontName(xFontName) )
             return wxEmptyString;
     }
 
@@ -639,8 +638,7 @@ wxString wxNativeFontInfo::GetXFontName() const
                 elt = wxT('*');
             }
 
-            // const_cast
-            ((wxNativeFontInfo *)this)->xFontName << wxT('-') << elt;
+            const_cast<wxNativeFontInfo *>(this)->xFontName << wxT('-') << elt;
         }
     }
 
@@ -658,8 +656,7 @@ wxNativeFontInfo::SetXFontComponent(wxXLFDField field, const wxString& value)
 
     if ( !HasElements() )
     {
-        // const_cast
-        if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) )
+        if ( !const_cast<wxNativeFontInfo *>(this)->FromXFontName(xFontName) )
         {
             wxFAIL_MSG( wxT("can't set font element for invalid XLFD") );