{
 #if wxMAC_USE_CORE_GRAPHICS
         m_selected.EndRawAccess() ;
-        CGContextRef bmCtx = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
+        CGContextRef bmCtx = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
         delete m_graphicContext ;
         m_graphicContext = NULL ;
         CGContextRelease( bmCtx ) ;
     {
 #if wxMAC_USE_CORE_GRAPHICS
         m_selected.EndRawAccess() ;
-        CGContextRef bmCtx = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
+        CGContextRef bmCtx = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
         delete m_graphicContext ;
         m_graphicContext = NULL ;
         CGContextRelease( bmCtx ) ;
 
 #if wxMAC_USE_CORE_GRAPHICS
 void wxPrinterDC::MacSetCGContext( void * cg ) 
 {
-    (wxMacCGContext*)(m_graphicContext)->SetNativeContext( (CGContextRef) cg ) ;
+    ((wxMacCGContext*)(m_graphicContext))->SetNativeContext( (CGContextRef) cg ) ;
     m_graphicContext->SetPen( m_pen ) ;
     m_graphicContext->SetBrush( m_brush ) ;
 }
 
     {
 #if wxMAC_USE_CORE_GRAPHICS
         QDPictRef cgPictRef = M_METAFILEDATA->m_qdPictRef ;
-        CGContextRef cg = (wxMacCGContext*)(dc->GetGraphicContext())->GetNativeContext() ;
+        CGContextRef cg = ((wxMacCGContext*)(dc->GetGraphicContext()))->GetNativeContext() ;
         CGRect bounds = QDPictGetBounds( cgPictRef ) ;
 
         CGContextSaveGState(cg);