} \
const CLASS& operator=( const CLASS& it ) \
{ \
- Assign(it); \
+ if (this != &it) \
+ Assign(it); \
return *this; \
} \
CLASS& operator++() { Next(); return *this; } \
Assign(other);
}
+ /**
+ Additional assignment operator.
+ */
+ const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it )
+ {
+ Assign(it);
+ return *this;
+ }
+
protected:
};
#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