Avoid unnecessary casting in the comparison

Use variable of the same type as is returned by the function to avoid casting.
This commit is contained in:
Artur Wieczorek
2019-10-02 00:09:33 +02:00
parent 3bf082a8e5
commit 488582b04e

View File

@@ -2434,7 +2434,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const
else else
allChildrenSpecified = true; allChildrenSpecified = true;
unsigned int n = 0; size_t n = 0;
wxVariant childValue = list[n]; wxVariant childValue = list[n];
//wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName()); //wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName());
@@ -2460,7 +2460,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const
} }
n++; n++;
if ( n == (unsigned int)list.GetCount() ) if ( n == list.GetCount() )
break; break;
childValue = list[n]; childValue = list[n];
} }