Use wxVariant::IsType() function to check the type of variant values in wxPG.
Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() function and perform explicit comparisons of returned strings.
This commit is contained in:
@@ -1595,7 +1595,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
|
||||
else
|
||||
{
|
||||
// Is it list?
|
||||
if ( current->GetType() != wxS("list") )
|
||||
if ( !current->IsType(wxS("list")) )
|
||||
{
|
||||
// Not.
|
||||
}
|
||||
@@ -1638,7 +1638,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
|
||||
wxPGProperty* foundProp = BaseGetPropertyByName(propName);
|
||||
if ( foundProp )
|
||||
{
|
||||
wxASSERT( current->GetType() == wxPG_VARIANT_TYPE_LIST );
|
||||
wxASSERT( current->IsType(wxPG_VARIANT_TYPE_LIST) );
|
||||
|
||||
wxVariantList& list2 = current->GetList();
|
||||
wxVariantList::const_iterator node2;
|
||||
|
Reference in New Issue
Block a user