diff --git a/common/view/view.cpp b/common/view/view.cpp index a87fbacadc..629c5e9e87 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -302,8 +302,7 @@ void VIEW::Add( VIEW_ITEM* aItem, int aDrawPriority ) if( !aItem->m_viewPrivData ) aItem->m_viewPrivData = new VIEW_ITEM_DATA; - wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr - || aItem->m_viewPrivData->m_view == this, + wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr || aItem->m_viewPrivData->m_view == this, wxS( "Already in a different view!" ) ); aItem->m_viewPrivData->m_view = this; @@ -340,7 +339,8 @@ void VIEW::Remove( VIEW_ITEM* aItem ) std::vector::iterator item = m_allItems->end(); int cachedIndex = aItem->m_viewPrivData->m_cachedIndex; - if( cachedIndex >= 0 && cachedIndex < static_cast( m_allItems->size() ) + if( cachedIndex >= 0 + && cachedIndex < static_cast( m_allItems->size() ) && ( *m_allItems )[cachedIndex] == aItem ) { item = m_allItems->begin() + cachedIndex; diff --git a/pcbnew/pcb_view.cpp b/pcbnew/pcb_view.cpp index 68dbc03773..56bd612504 100644 --- a/pcbnew/pcb_view.cpp +++ b/pcbnew/pcb_view.cpp @@ -62,8 +62,8 @@ void PCB_VIEW::Add( KIGFX::VIEW_ITEM* aItem, int aDrawPriority ) if( boardItem->Type() == PCB_FOOTPRINT_T ) { - static_cast( boardItem ) - ->RunOnChildren( std::bind( &PCB_VIEW::Add, this, _1, aDrawPriority ), RECURSE_MODE::NO_RECURSE ); + static_cast( boardItem )->RunOnChildren( std::bind( &PCB_VIEW::Add, this, _1, aDrawPriority ), + RECURSE_MODE::NO_RECURSE ); } } @@ -79,8 +79,8 @@ void PCB_VIEW::Remove( KIGFX::VIEW_ITEM* aItem ) if( boardItem->Type() == PCB_FOOTPRINT_T ) { - static_cast( boardItem ) - ->RunOnChildren( std::bind( &PCB_VIEW::Remove, this, _1 ), RECURSE_MODE::NO_RECURSE ); + static_cast( boardItem )->RunOnChildren( std::bind( &PCB_VIEW::Remove, this, _1 ), + RECURSE_MODE::NO_RECURSE ); } } diff --git a/pcbnew/undo_redo.cpp b/pcbnew/undo_redo.cpp index e1ddd8b393..f7627082d5 100644 --- a/pcbnew/undo_redo.cpp +++ b/pcbnew/undo_redo.cpp @@ -333,8 +333,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) { // This is an error condition - item has already been changed so should not // be added - wxASSERT_MSG( false, - wxT( "UndoRedo: should not add already changed item" ) ); + wxASSERT_MSG( false, wxT( "UndoRedo: should not add already changed item" ) ); } // Otherwise, item remains CHANGED