From 56d42c776a56c5f36f6043e5a15172a47f9bcaaf Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 19 Oct 2017 09:49:09 +0200 Subject: [PATCH] Replace assert() by wxASSERT to make debug more easy. --- pcbnew/board_commit.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp index 2ef7e32e15..df2a1923d5 100644 --- a/pcbnew/board_commit.cpp +++ b/pcbnew/board_commit.cpp @@ -87,12 +87,12 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) { if( !ent.m_copy ) { - assert( changeType != CHT_MODIFY ); // too late to make a copy.. + wxASSERT( changeType != CHT_MODIFY ); // too late to make a copy.. ent.m_copy = ent.m_item->Clone(); } - assert( ent.m_item->Type() == PCB_MODULE_T ); - assert( ent.m_copy->Type() == PCB_MODULE_T ); + wxASSERT( ent.m_item->Type() == PCB_MODULE_T ); + wxASSERT( ent.m_copy->Type() == PCB_MODULE_T ); if( aCreateUndoEntry ) { @@ -132,7 +132,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) else { // modules inside modules are not supported yet - assert( boardItem->Type() != PCB_MODULE_T ); + wxASSERT( boardItem->Type() != PCB_MODULE_T ); boardItem->SetParent( board->m_Modules.GetFirst() ); if( !( changeFlags & CHT_DONE ) ) @@ -183,7 +183,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) break; default: - assert( false ); + wxASSERT( false ); break; } } @@ -195,7 +195,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) if( !( changeFlags & CHT_DONE ) ) { MODULE* module = static_cast( boardItem->GetParent() ); - assert( module && module->Type() == PCB_MODULE_T ); + wxASSERT( module && module->Type() == PCB_MODULE_T ); module->Delete( boardItem ); } @@ -225,7 +225,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) case PCB_MODULE_T: { // There are no modules inside a module yet - assert( !m_editModules ); + wxASSERT( !m_editModules ); MODULE* module = static_cast( boardItem ); module->ClearFlags(); @@ -242,7 +242,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) break; default: // other types do not need to (or should not) be handled - assert( false ); + wxASSERT( false ); break; } break; @@ -253,7 +253,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) if( !m_editModules && aCreateUndoEntry ) { ITEM_PICKER itemWrapper( boardItem, UR_CHANGED ); - assert( ent.m_copy ); + wxASSERT( ent.m_copy ); itemWrapper.SetLink( ent.m_copy ); undoList.PushItem( itemWrapper ); } @@ -271,7 +271,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) } default: - assert( false ); + wxASSERT( false ); break; } } @@ -381,7 +381,7 @@ void BOARD_COMMIT::Revert() } default: - assert( false ); + wxASSERT( false ); break; } }