remove unnecessary casts

This commit is contained in:
dickelbeck 2008-04-29 16:24:16 +00:00
parent b74db435f5
commit b8bfa5a6c0
1 changed files with 29 additions and 29 deletions

View File

@ -207,7 +207,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
break;
case HK_SWITCH_LAYER_TO_PREVIOUS:
ll = ((PCB_SCREEN*)GetScreen())->m_Active_Layer;
ll = GetScreen()->m_Active_Layer;
if( (ll <= COPPER_LAYER_N) || (ll > CMP_N) )
break;
if( m_Pcb->m_BoardSettings->m_CopperLayerCount < 2 ) // Single layer
@ -220,7 +220,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
break;
case HK_SWITCH_LAYER_TO_NEXT:
ll = ((PCB_SCREEN*)GetScreen())->m_Active_Layer;
ll = GetScreen()->m_Active_Layer;
if( (ll < COPPER_LAYER_N) || (ll >= CMP_N) )
break;
if( m_Pcb->m_BoardSettings->m_CopperLayerCount < 2 ) // Single layer
@ -305,7 +305,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
break;
case HK_BACK_SPACE:
if( m_ID_current_state == ID_TRACK_BUTT && ((PCB_SCREEN*)GetScreen())->m_Active_Layer <= CMP_N )
if( m_ID_current_state == ID_TRACK_BUTT && GetScreen()->m_Active_Layer <= CMP_N )
{
if( ItemFree )
{
@ -393,7 +393,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
return;
// place micro via and switch layer
if ( ((PCB_SCREEN*)GetScreen())->IsMicroViaAcceptable() )
if ( GetScreen()->IsMicroViaAcceptable() )
{
int v_type = g_DesignSettings.m_CurrentViaType;
g_DesignSettings.m_CurrentViaType = VIA_MICROVIA;
@ -601,7 +601,7 @@ bool WinEDA_PcbFrame::OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct )
switch( m_ID_current_state )
{
case ID_TRACK_BUTT:
if( ((PCB_SCREEN*)GetScreen())->m_Active_Layer > CMP_N )
if( GetScreen()->m_Active_Layer > CMP_N )
return FALSE;
if( ItemFree )
{