an upstream patch for clang compile error
old
|
new
|
void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesire |
299 | 299 | PenColour(fore); |
300 | 300 | BrushColour(back); |
301 | 301 | /* C::B begin */ |
302 | | // Since Point now has float as x and y, it seems no longer to be interchangeable with wxPoint, |
303 | | // and the polygon is not drawn, so we convert it explicitely |
304 | | wxPoint points[npts]; |
305 | | for (int i = 0; i < npts; ++i) |
306 | | points[i] = wxPoint(pts[i].x, pts[i].y); |
307 | | hDC->DrawPolygon(npts, points); |
| 302 | wxPoint *p = new wxPoint[npts]; |
| 303 | |
| 304 | for (int i=0; i<npts; i++) { |
| 305 | p[i].x = pts[i].x; |
| 306 | p[i].y = pts[i].y; |
| 307 | } |
| 308 | hDC->DrawPolygon(npts, p); |
| 309 | delete [] p; |
308 | 310 | /* C::B end */ |
309 | 311 | } |
310 | 312 | |