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