use const arrays for wxDC array parameters, closes #10712
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -622,8 +622,8 @@ void wxDCImpl::DrawPolygon(const wxPointList *list,
|
||||
|
||||
void
|
||||
wxDCImpl::DoDrawPolyPolygon(int n,
|
||||
int count[],
|
||||
wxPoint points[],
|
||||
const int count[],
|
||||
const wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
wxPolygonFillMode fillStyle)
|
||||
{
|
||||
@@ -673,11 +673,11 @@ void wxDCImpl::DrawSpline(wxCoord x1, wxCoord y1,
|
||||
DrawSpline(WXSIZEOF(points), points);
|
||||
}
|
||||
|
||||
void wxDCImpl::DrawSpline(int n, wxPoint points[])
|
||||
void wxDCImpl::DrawSpline(int n, const wxPoint points[])
|
||||
{
|
||||
wxPointList list;
|
||||
for ( int i = 0; i < n; i++ )
|
||||
list.Append(&points[i]);
|
||||
list.Append(const_cast<wxPoint*>(&points[i]));
|
||||
|
||||
DrawSpline(&list);
|
||||
}
|
||||
@@ -799,7 +799,7 @@ void wxDCImpl::DoDrawSpline( const wxPointList *points )
|
||||
{
|
||||
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
|
||||
|
||||
wxPoint *p;
|
||||
const wxPoint *p;
|
||||
double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;
|
||||
double x1, y1, x2, y2;
|
||||
|
||||
@@ -808,7 +808,7 @@ void wxDCImpl::DoDrawSpline( const wxPointList *points )
|
||||
// empty list
|
||||
return;
|
||||
|
||||
p = (wxPoint *)node->GetData();
|
||||
p = node->GetData();
|
||||
|
||||
x1 = p->x;
|
||||
y1 = p->y;
|
||||
|
||||
Reference in New Issue
Block a user