Eliminate -Wcast-qual warnings with GCC and Clang
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
This commit is contained in:
@@ -638,7 +638,7 @@ wxSize wxFont::GetPixelSize() const
|
||||
#if wxUSE_GRAPHICS_CONTEXT
|
||||
// TODO: consider caching the value
|
||||
wxGraphicsContext* dc = wxGraphicsContext::CreateFromNative((CGContextRef)NULL);
|
||||
dc->SetFont(*(wxFont*)this, *wxBLACK);
|
||||
dc->SetFont(*this, *wxBLACK);
|
||||
wxDouble width, height = 0;
|
||||
dc->GetTextExtent(wxT("g"), &width, &height, NULL, NULL);
|
||||
delete dc;
|
||||
|
||||
Reference in New Issue
Block a user