]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/ole/oleutils.h
If several doc templates use the same document and view classes, they should
[wxWidgets.git] / include / wx / msw / ole / oleutils.h
index afab7f2854375b1a95acbd73ebd5d0b795b542eb..9f71b28de5d34e28f5cd4abc97f981c21a78f67d 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef   _WX_OLEUTILS_H
 #define   _WX_OLEUTILS_H
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma interface "oleutils.h"
 #endif
 
@@ -72,7 +72,7 @@ public:
     wxAutoULong(ULONG value = 0) : m_Value(value) { }
 
     operator ULONG&() { return m_Value; }
-    ULONG& operator=(ULONG value) { return m_Value = value; }
+    ULONG& operator=(ULONG value) { m_Value = value; return m_Value;  }
     
     wxAutoULong& operator++() { ++m_Value; return *this; }
     const wxAutoULong operator++( int ) { wxAutoULong temp = *this; ++m_Value; return temp; }
@@ -134,7 +134,7 @@ private:
   {                                                                           \
     wxLogRelease(_T(#classname), m_cRef);                                     \
                                                                               \
-    if ( --m_cRef == 0 ) {                                                    \
+    if ( --m_cRef == wxAutoULong(0) ) {                                                    \
       delete this;                                                            \
       return 0;                                                               \
     }                                                                         \