// assorted assignment operators
wxFileName& operator=(const wxFileName& filename)
- { Assign(filename); return *this; }
+ { if (this != &filename) Assign(filename); return *this; }
wxFileName& operator=(const wxString& filename)
{ Assign(filename); return *this; }
#ifndef SWIG
void operator=(const wxColourPropertyValue& cpv)
{
- Init( cpv.m_type, cpv.m_colour );
+ if (this != &cpv)
+ Init( cpv.m_type, cpv.m_colour );
}
private:
const wxColour& value = *wxWHITE );
virtual ~wxColourProperty();
-protected:
virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const;
virtual wxColour GetColour( int index ) const;
+
+protected:
virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const;
private:
data->IncRef();
variant.SetData(data);
variant.SetName(it->first);
- it++;
+ ++it;
return true;
}
#ifndef SWIG
void operator= (const wxPGChoices& a)
{
- AssignData(a.m_data);
+ if (this != &a)
+ AssignData(a.m_data);
}
wxPGChoiceEntry& operator[](unsigned int i)
int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
-protected:
virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
+protected:
void SetTextColIndex( unsigned int colInd )
{ m_capFgColIndex = (wxByte) colInd; }
unsigned int GetTextColIndex() const
} \
const CLASS& operator=( const CLASS& it ) \
{ \
- Assign(it); \
+ if (this != &it) \
+ Assign(it); \
return *this; \
} \
CLASS& operator++() { Next(); return *this; } \
#ifndef SWIG
const wxPGVIterator& operator=( const wxPGVIterator& it )
{
- UnRef();
- m_pIt = it.m_pIt;
- m_pIt->IncRef();
+ if (this != &it)
+ {
+ UnRef();
+ m_pIt = it.m_pIt;
+ m_pIt->IncRef();
+ }
return *this;
}
#endif
wxVector& operator=(const wxVector& vb)
{
- clear();
- Copy(vb);
+ if (this != &vb)
+ {
+ clear();
+ Copy(vb);
+ }
return *this;
}