From b74db435f57fea5a52944cf9e077a3cf474307ad Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 29 Apr 2008 16:22:39 +0000 Subject: [PATCH] remove unnecessary casts --- pcbnew/edit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 571e003da9..c40a6fdfa7 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1087,7 +1087,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer ) /*****************************************************************/ { - int preslayer = ((PCB_SCREEN*)GetScreen())->m_Active_Layer; + int preslayer = GetScreen()->m_Active_Layer; // Check if the specified layer matches the present layer if( layer == preslayer ) @@ -1140,9 +1140,9 @@ void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer ) // Want to set the routing layers so that it switches properly - // see the implementation of Other_Layer_Route - the working // layer is used to 'start' the via and set the layer masks appropriately. - ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP = preslayer; - ((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM = layer; - ((PCB_SCREEN*)GetScreen())->m_Active_Layer = preslayer; + GetScreen()->m_Route_Layer_TOP = preslayer; + GetScreen()->m_Route_Layer_BOTTOM = layer; + GetScreen()->m_Active_Layer = preslayer; if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { @@ -1163,7 +1163,7 @@ void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer ) // and a non-copper layer, or vice-versa? // ... - ((PCB_SCREEN*)GetScreen())->m_Active_Layer = layer; + GetScreen()->m_Active_Layer = layer; if( DisplayOpt.ContrastModeDisplay ) GetScreen()->SetRefreshReq();