Avoid pointer overflow warning in wxPropertyGridPageState::DoRemoveFromSelection()

Looks like gcc8.1 think 'sel' can be empty after initialization. Avoid this by copying only the remaining entries.
This commit is contained in:
pavel-t
2018-07-06 10:54:15 +03:00
parent 99ea06203a
commit 2171076e81

View File

@@ -1371,8 +1371,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop )
{
// If first item (i.e. one with the active editor) was
// deselected, then we need to take some extra measures.
wxArrayPGProperty sel = m_selection;
sel.erase( sel.begin() + i );
wxArrayPGProperty sel(m_selection.begin() + 1, m_selection.end());
wxPGProperty* newFirst = sel.empty()? NULL: sel[0];