Formatting.

This commit is contained in:
Jeff Young 2025-06-23 22:11:31 -06:00
parent bb92b40364
commit e2808846ce
3 changed files with 8 additions and 9 deletions

View File

@ -302,8 +302,7 @@ void VIEW::Add( VIEW_ITEM* aItem, int aDrawPriority )
if( !aItem->m_viewPrivData ) if( !aItem->m_viewPrivData )
aItem->m_viewPrivData = new VIEW_ITEM_DATA; aItem->m_viewPrivData = new VIEW_ITEM_DATA;
wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr || aItem->m_viewPrivData->m_view == this,
|| aItem->m_viewPrivData->m_view == this,
wxS( "Already in a different view!" ) ); wxS( "Already in a different view!" ) );
aItem->m_viewPrivData->m_view = this; aItem->m_viewPrivData->m_view = this;
@ -340,7 +339,8 @@ void VIEW::Remove( VIEW_ITEM* aItem )
std::vector<VIEW_ITEM*>::iterator item = m_allItems->end(); std::vector<VIEW_ITEM*>::iterator item = m_allItems->end();
int cachedIndex = aItem->m_viewPrivData->m_cachedIndex; int cachedIndex = aItem->m_viewPrivData->m_cachedIndex;
if( cachedIndex >= 0 && cachedIndex < static_cast<ssize_t>( m_allItems->size() ) if( cachedIndex >= 0
&& cachedIndex < static_cast<ssize_t>( m_allItems->size() )
&& ( *m_allItems )[cachedIndex] == aItem ) && ( *m_allItems )[cachedIndex] == aItem )
{ {
item = m_allItems->begin() + cachedIndex; item = m_allItems->begin() + cachedIndex;

View File

@ -62,8 +62,8 @@ void PCB_VIEW::Add( KIGFX::VIEW_ITEM* aItem, int aDrawPriority )
if( boardItem->Type() == PCB_FOOTPRINT_T ) if( boardItem->Type() == PCB_FOOTPRINT_T )
{ {
static_cast<FOOTPRINT*>( boardItem ) static_cast<FOOTPRINT*>( boardItem )->RunOnChildren( std::bind( &PCB_VIEW::Add, this, _1, aDrawPriority ),
->RunOnChildren( std::bind( &PCB_VIEW::Add, this, _1, aDrawPriority ), RECURSE_MODE::NO_RECURSE ); RECURSE_MODE::NO_RECURSE );
} }
} }
@ -79,8 +79,8 @@ void PCB_VIEW::Remove( KIGFX::VIEW_ITEM* aItem )
if( boardItem->Type() == PCB_FOOTPRINT_T ) if( boardItem->Type() == PCB_FOOTPRINT_T )
{ {
static_cast<FOOTPRINT*>( boardItem ) static_cast<FOOTPRINT*>( boardItem )->RunOnChildren( std::bind( &PCB_VIEW::Remove, this, _1 ),
->RunOnChildren( std::bind( &PCB_VIEW::Remove, this, _1 ), RECURSE_MODE::NO_RECURSE ); RECURSE_MODE::NO_RECURSE );
} }
} }

View File

@ -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 // This is an error condition - item has already been changed so should not
// be added // be added
wxASSERT_MSG( false, wxASSERT_MSG( false, wxT( "UndoRedo: should not add already changed item" ) );
wxT( "UndoRedo: should not add already changed item" ) );
} }
// Otherwise, item remains CHANGED // Otherwise, item remains CHANGED