Use conditional operators to simplify statements

This commit is contained in:
Artur Wieczorek
2022-05-27 18:52:37 +02:00
parent 502ede23ab
commit 334a8c70ec

View File

@@ -1115,12 +1115,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
wxS(">> %s.StringToValue('%s')"), GetLabel(), text); wxS(">> %s.StringToValue('%s')"), GetLabel(), text);
wxString::const_iterator it = text.begin(); wxString::const_iterator it = text.begin();
wxUniChar a; wxUniChar a = ( it != text.end() ) ? *it : 0;
if ( it != text.end() )
a = *it;
else
a = 0;
for ( ;; ) for ( ;; )
{ {
@@ -1274,14 +1269,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
it += strPosIncrement; it += strPosIncrement;
if ( it != text.end() ) a = ( it != text.end() ) ? *it : 0;
{
a = *it;
}
else
{
a = 0;
}
pos += strPosIncrement; pos += strPosIncrement;
} }