Use empty() member function to determine if arrays are empty in wxPG.

Use this dedicated function instead of checking if size() function returns zero/non-zero value.
This commit is contained in:
Artur Wieczorek
2015-05-24 20:36:16 +02:00
parent 09a78c77d0
commit b3ad8dae84
5 changed files with 9 additions and 18 deletions

View File

@@ -1381,11 +1381,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop )
wxArrayPGProperty sel = m_selection;
sel.erase( sel.begin() + i );
wxPGProperty* newFirst;
if ( sel.size() )
newFirst = sel[0];
else
newFirst = NULL;
wxPGProperty* newFirst = sel.empty()? NULL: sel[0];
pg->DoSelectProperty(newFirst,
wxPG_SEL_DONT_SEND_EVENT);