git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56794
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// assorted assignment operators
wxFileName& operator=(const wxFileName& filename)
// 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; }
wxFileName& operator=(const wxString& filename)
{ Assign(filename); return *this; }
#ifndef SWIG
void operator=(const wxColourPropertyValue& cpv)
{
#ifndef SWIG
void operator=(const wxColourPropertyValue& cpv)
{
- Init( cpv.m_type, cpv.m_colour );
+ if (this != &cpv)
+ Init( cpv.m_type, cpv.m_colour );
const wxColour& value = *wxWHITE );
virtual ~wxColourProperty();
const wxColour& value = *wxWHITE );
virtual ~wxColourProperty();
virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const;
virtual wxColour GetColour( int index ) const;
virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const;
virtual wxColour GetColour( int index ) const;
virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const;
private:
virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const;
private:
data->IncRef();
variant.SetData(data);
variant.SetName(it->first);
data->IncRef();
variant.SetData(data);
variant.SetName(it->first);
#ifndef SWIG
void operator= (const wxPGChoices& a)
{
#ifndef SWIG
void operator= (const wxPGChoices& a)
{
+ if (this != &a)
+ AssignData(a.m_data);
}
wxPGChoiceEntry& operator[](unsigned int i)
}
wxPGChoiceEntry& operator[](unsigned int i)
int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
void SetTextColIndex( unsigned int colInd )
{ m_capFgColIndex = (wxByte) colInd; }
unsigned int GetTextColIndex() const
void SetTextColIndex( unsigned int colInd )
{ m_capFgColIndex = (wxByte) colInd; }
unsigned int GetTextColIndex() const
} \
const CLASS& operator=( const CLASS& it ) \
{ \
} \
const CLASS& operator=( const CLASS& it ) \
{ \
+ if (this != &it) \
+ Assign(it); \
return *this; \
} \
CLASS& operator++() { Next(); return *this; } \
return *this; \
} \
CLASS& operator++() { Next(); return *this; } \
#ifndef SWIG
const wxPGVIterator& operator=( const wxPGVIterator& it )
{
#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();
+ }
wxVector& operator=(const wxVector& vb)
{
wxVector& operator=(const wxVector& vb)
{
+ if (this != &vb)
+ {
+ clear();
+ Copy(vb);
+ }