Use conditional operators to simplify statements
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user