Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / msw / brush.cpp
index 5f497f119c28b409fd9a7aefed4b8b22e6179336..5eae40c16a16c93f2ac807542f54e3dcc1a283b3 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -149,9 +149,10 @@ void wxBrushRefData::Free()
     }
 }
 
-static int TransllateHatchStyle(int style)
-{
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
+
+static int TranslateHatchStyle(int style)
+{
     switch ( style )
     {
         case wxBDIAGONAL_HATCH: return HS_BDIAGONAL;
@@ -162,19 +163,18 @@ static int TransllateHatchStyle(int style)
         case wxVERTICAL_HATCH:  return HS_VERTICAL;
         default:                return -1;
     }
-#else // __WXMICROWIN__
-    return -1;
-#endif
 }
 
+#endif // !__WXMICROWIN__ && !__WXWINCE__
+
 HBRUSH wxBrushRefData::GetHBRUSH()
 {
     if ( !m_hBrush )
     {
-#ifndef __WXWINCE__
-        int hatchStyle = TransllateHatchStyle(m_style);
+#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
+        int hatchStyle = TranslateHatchStyle(m_style);
         if ( hatchStyle == -1 )
-#endif
+#endif // !__WXMICROWIN__ && !__WXWINCE__
         {
             switch ( m_style )
             {