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:
@@ -1207,7 +1207,7 @@ wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name,
|
||||
{
|
||||
SetIndex(0);
|
||||
|
||||
if ( &labels && labels.size() )
|
||||
if ( &labels && !labels.empty() )
|
||||
{
|
||||
m_choices.Set(labels, values);
|
||||
|
||||
@@ -1595,7 +1595,7 @@ wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name,
|
||||
{
|
||||
m_oldChoicesData = NULL;
|
||||
|
||||
if ( &labels && labels.size() )
|
||||
if ( &labels && !labels.empty() )
|
||||
{
|
||||
m_choices.Set(labels,values);
|
||||
|
||||
|
Reference in New Issue
Block a user