From 488582b04ebe22f01b6b42da9e323d8e94bce191 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 2 Oct 2019 00:09:33 +0200 Subject: [PATCH] Avoid unnecessary casting in the comparison Use variable of the same type as is returned by the function to avoid casting. --- src/propgrid/property.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 4d0e533315..97a5aaad18 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -2434,7 +2434,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const else allChildrenSpecified = true; - unsigned int n = 0; + size_t n = 0; wxVariant childValue = list[n]; //wxLogDebug(wxS(">> %s.AdaptListToValue()"),GetBaseName()); @@ -2460,7 +2460,7 @@ void wxPGProperty::AdaptListToValue( wxVariant& list, wxVariant* value ) const } n++; - if ( n == (unsigned int)list.GetCount() ) + if ( n == list.GetCount() ) break; childValue = list[n]; }