unused parameters and float/double->int conversion warning fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-30 14:31:09 +00:00
parent b4d9758e1c
commit 9a8864cad7
3 changed files with 48 additions and 37 deletions

View File

@@ -36,7 +36,7 @@ wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
DoSelect(bitmap);
}
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc )
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC * WXUNUSED(dc) )
: wxPaintDCImpl( owner )
{
Init();

View File

@@ -97,9 +97,12 @@ wxRegion::wxRegion(const wxRect& rect)
wxRegion::wxRegion(size_t n, const wxPoint *points, int WXUNUSED(fillStyle))
{
m_refData = new wxRegionRefData;
wxUnusedVar(n);
wxUnusedVar(points);
#if 0 // ndef __LP64__
m_refData = new wxRegionRefData;
// TODO : any APIs ?
// OS X somehow does not collect the region invisibly as before, so sometimes things
// get drawn on screen instead of just being combined into a region, therefore we allocate a temp gworld now
@@ -138,6 +141,9 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, int WXUNUSED(fillStyle))
::SetGWorld( oldWorld, oldGDHandle );
}
#else
wxFAIL_MSG( "not implemented" );
m_refData = NULL;
#endif
}
@@ -238,10 +244,10 @@ bool wxRegion::DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
{
CGRect box ;
HIShapeGetBounds( M_REGION , &box ) ;
x = box.origin.x ;
y = box.origin.y ;
w = box.size.width ;
h = box.size.height ;
x = wx_static_cast(int, box.origin.x);
y = wx_static_cast(int, box.origin.y);
w = wx_static_cast(int, box.size.width);
h = wx_static_cast(int, box.size.height);
return true;
}

View File

@@ -1963,6 +1963,12 @@ CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush )
#if wxMAC_USE_QUICKDRAW
static inline void PointFromHIPoint(const HIPoint& p, Point *pt)
{
pt->h = wx_static_cast(short, p.x);
pt->v = wx_static_cast(short, p.y);
}
void wxMacGlobalToLocal( WindowRef window , Point*pt )
{
HIPoint p = CGPointMake( pt->h, pt->v );
@@ -1970,8 +1976,7 @@ void wxMacGlobalToLocal( WindowRef window , Point*pt )
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
pt->h = p.x;
pt->v = p.y;
PointFromHIPoint(p, pt);
}
void wxMacLocalToGlobal( WindowRef window , Point*pt )
@@ -1981,10 +1986,10 @@ void wxMacLocalToGlobal( WindowRef window , Point*pt )
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
pt->h = p.x;
pt->v = p.y;
PointFromHIPoint(p, pt);
}
#endif
#endif // wxMAC_USE_QUICKDRAW
#endif // wxUSE_GUI