From: Gilles Depeyrot Date: Sun, 2 Mar 2003 19:57:47 +0000 (+0000) Subject: added missing include file and corrected memory leak due to creation of X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a73903480fd533fcac58fc42262db95f2bf704f8 added missing include file and corrected memory leak due to creation of never used region (NewRgn) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index d155b4f711..ed0648f9dc 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -17,6 +17,7 @@ #include "wx/app.h" #include "wx/mac/uma.h" #include "wx/dcmemory.h" +#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" #include "wx/log.h" @@ -25,6 +26,7 @@ #include "math.h" using namespace std ; #endif + #include "wx/mac/private.h" #include "ATSUnicode.h" #include "TextCommon.h" @@ -88,7 +90,6 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) SetClip( m_newClip ) ; DisposeRgn( insidergn ) ; #endif - RgnHandle insidergn = NewRgn() ; int x = 0 , y = 0; win->MacWindowToRootWindow( &x,&y ) ; CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ; @@ -2202,4 +2203,4 @@ wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const { return ((wxDC *)this)->YLOG2DEVREL(y); -} \ No newline at end of file +} diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index d155b4f711..ed0648f9dc 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -17,6 +17,7 @@ #include "wx/app.h" #include "wx/mac/uma.h" #include "wx/dcmemory.h" +#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" #include "wx/log.h" @@ -25,6 +26,7 @@ #include "math.h" using namespace std ; #endif + #include "wx/mac/private.h" #include "ATSUnicode.h" #include "TextCommon.h" @@ -88,7 +90,6 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) SetClip( m_newClip ) ; DisposeRgn( insidergn ) ; #endif - RgnHandle insidergn = NewRgn() ; int x = 0 , y = 0; win->MacWindowToRootWindow( &x,&y ) ; CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ; @@ -2202,4 +2203,4 @@ wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const { return ((wxDC *)this)->YLOG2DEVREL(y); -} \ No newline at end of file +}