Don't test if a reference is null, this cannot happen.

Testing for null references is unnecessary and just results in clang warnings.

Closes #17016.
This commit is contained in:
Jan van Dijk
2015-06-03 17:08:30 +02:00
committed by Vadim Zeitlin
parent 09e1223d2e
commit 72a4c3a4d0
4 changed files with 5 additions and 16 deletions

View File

@@ -947,10 +947,7 @@ wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxS
gs_cp_es_syscolour_values,
&gs_wxSystemColourProperty_choicesCache )
{
if ( &value )
Init( value.m_type, value.m_colour );
else
Init( wxPG_COLOUR_CUSTOM, *wxWHITE );
}
@@ -959,10 +956,7 @@ wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxS
const wxColourPropertyValue& value )
: wxEnumProperty( label, name, labels, values, choicesCache )
{
if ( &value )
Init( value.m_type, value.m_colour );
else
Init( wxPG_COLOUR_CUSTOM, *wxWHITE );
}
@@ -971,10 +965,7 @@ wxSystemColourProperty::wxSystemColourProperty( const wxString& label, const wxS
const wxColour& value )
: wxEnumProperty( label, name, labels, values, choicesCache )
{
if ( &value )
Init( wxPG_COLOUR_CUSTOM, value );
else
Init( wxPG_COLOUR_CUSTOM, *wxWHITE );
}
@@ -2063,7 +2054,7 @@ wxArrayInt wxMultiChoiceProperty::GetValueAsIndices() const
// Translate values to string indices.
wxArrayInt selections;
if ( !m_choices.IsOk() || !m_choices.GetCount() || !(&valueArr) )
if ( !m_choices.IsOk() || !m_choices.GetCount() )
{
for ( i=0; i<valueArr.size(); i++ )
selections.Add(-1);