]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bitmap.cpp
wxDataViewCtrl::Expand() only works on items whose parents are already
[wxWidgets.git] / src / msw / bitmap.cpp
index 850baa8602fdf9c5286ddaa91f753cac7208d76b..b0e759a7b90517b86d00b986aeb9e0eb81ccadd3 100644 (file)
@@ -238,8 +238,7 @@ void wxBitmapRefData::Free()
         }
     }
 
-    delete m_bitmapMask;
-    m_bitmapMask = NULL;
+    wxDELETE(m_bitmapMask);
 }
 
 // ----------------------------------------------------------------------------
@@ -415,7 +414,7 @@ bool wxBitmap::CopyFromDIB(const wxDIB& dib)
     if ( !hbitmap )
         return false;
 #else // ALWAYS_USE_DIB
-    HBITMAP hbitmap = ((wxDIB &)dib).Detach();  // const_cast
+    HBITMAP hbitmap = const_cast<wxDIB &>(dib).Detach();
 #endif // SOMETIMES_USE_DIB/ALWAYS_USE_DIB
 
     UnRef();
@@ -494,7 +493,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
     else
     {
         // bits should already be in Windows standard format
-        data = (char *)bits;    // const_cast is harmless
+        data = const_cast<char *>(bits);
     }
 
     HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data);