Formatting change for dynamic cast tests

This commit is contained in:
Ian McInerney 2020-01-13 01:48:57 +00:00
parent 36f6b4a9b4
commit 8fc434be19
2 changed files with 2 additions and 6 deletions

View File

@ -766,9 +766,7 @@ void TOOL_MANAGER::DispatchContextMenu( const TOOL_EVENT& aEvent )
m_menuOwner = toolId;
m_menuActive = true;
auto frame = dynamic_cast<wxFrame*>( m_frame );
if( frame )
if( auto frame = dynamic_cast<wxFrame*>( m_frame ) )
frame->PopupMenu( menu.get() );
// Warp the cursor if a menu item was selected

View File

@ -116,9 +116,7 @@ const LSET PCBNEW_SELECTION::GetSelectionLayers()
for( auto item : m_items )
{
auto board_item = dynamic_cast<BOARD_ITEM*>( item );
if( board_item )
if( auto board_item = dynamic_cast<BOARD_ITEM*>( item ) )
retval |= board_item->GetLayerSet();
}