X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4676948b6814c97b93c431a8cbcd8c0352c87ba9..21bd196564d8483879a57c40ec1eea64114f9bd4:/src/msw/brush.cpp diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index f1109f4633..07c11e9bdb 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -13,7 +13,7 @@ // declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "brush.h" #endif @@ -103,7 +103,8 @@ wxBrushRefData::wxBrushRefData(const wxBitmap& stipple) } wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) - : m_stipple(data.m_stipple), + : wxGDIRefData(), + m_stipple(data.m_stipple), m_colour(data.m_colour) { m_style = data.m_style; @@ -149,9 +150,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 +164,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 ) { @@ -248,7 +249,7 @@ wxBrush::~wxBrush() wxBrush& wxBrush::operator=(const wxBrush& brush) { - if ( *this != brush ) + if ( this != &brush ) { Ref(brush); }