]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridpagestate.h
compilation fixes for Unix after moving wxFD_XXX macros from wx/unix/private.h
[wxWidgets.git] / include / wx / propgrid / propgridpagestate.h
index 2bcbab1592171713493c3b8edf197838fa612218..f8953663895c8ecb28f5c468308c89f953587791 100644 (file)
@@ -234,7 +234,8 @@ private:
     } \
     const CLASS& operator=( const CLASS& it ) \
     { \
-        Assign(it); \
+        if (this != &it) \
+            Assign(it); \
         return *this; \
     } \
     CLASS& operator++() { Next(); return *this; } \
@@ -297,6 +298,15 @@ public:
         Assign(other);
     }
 
+    /**
+        Additional assignment operator.
+    */
+    const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it )
+    {
+        Assign(it);
+        return *this;
+    }
+
 protected:
 };
 
@@ -350,9 +360,12 @@ public:
 #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