Commit de03accd authored by Maciej Suminski's avatar Maciej Suminski

Coverity report fixes.

parent c6f4f159
...@@ -222,7 +222,7 @@ int BOARD_ITEM::getTrailingInt( wxString aStr ) ...@@ -222,7 +222,7 @@ int BOARD_ITEM::getTrailingInt( wxString aStr )
int BOARD_ITEM::getNextNumberInSequence( std::set<int> aSeq, bool aFillSequenceGaps) int BOARD_ITEM::getNextNumberInSequence( std::set<int> aSeq, bool aFillSequenceGaps)
{ {
// By default go to the end of the sequence // By default go to the end of the sequence
int candidate = *aSeq.end(); int candidate = *aSeq.rbegin();
// Filling in gaps in pad numbering // Filling in gaps in pad numbering
if( aFillSequenceGaps ) if( aFillSequenceGaps )
......
...@@ -272,6 +272,8 @@ void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event ) ...@@ -272,6 +272,8 @@ void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event )
// Only use settings if all values are good // Only use settings if all values are good
if( ok ) if( ok )
newSettings = newGrid; newSettings = newGrid;
else
delete newGrid;
} }
else if( page == m_circularPanel ) else if( page == m_circularPanel )
{ {
...@@ -301,6 +303,8 @@ void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event ) ...@@ -301,6 +303,8 @@ void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event )
// Only use settings if all values are good // Only use settings if all values are good
if( ok ) if( ok )
newSettings = newCirc; newSettings = newCirc;
else
delete newCirc;
} }
// If we got good settings, send them out and finish // If we got good settings, send them out and finish
......
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
EDIT_TOOL::EDIT_TOOL() : EDIT_TOOL::EDIT_TOOL() :
TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ), TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ),
m_dragging( false ), m_editModules( false ), m_updateFlag( KIGFX::VIEW_ITEM::NONE ) m_dragging( false ), m_editModules( false ), m_undoInhibit( 0 ),
m_updateFlag( KIGFX::VIEW_ITEM::NONE )
{ {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment