X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b2a860f0d3ee4724e3c0c5d2ba67a982c220b4a..6f3f38980f10a935f3b47dbf0d3b4643e96a4be2:/src/unix/fontutil.cpp diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 39554c0fff..8a0fbb2193 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -581,8 +581,7 @@ wxString wxNativeFontInfo::GetXFontComponent(wxXLFDField field) const if ( !HasElements() ) { - // const_cast - if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) ) + if ( !const_cast(this)->FromXFontName(xFontName) ) return wxEmptyString; } @@ -639,8 +638,7 @@ wxString wxNativeFontInfo::GetXFontName() const elt = wxT('*'); } - // const_cast - ((wxNativeFontInfo *)this)->xFontName << wxT('-') << elt; + const_cast(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(this)->FromXFontName(xFontName) ) { wxFAIL_MSG( wxT("can't set font element for invalid XLFD") );