Ticket #40386: patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff

File patch-src-sdk-wxscintilla-src-PlatWX.cpp.diff, 817 bytes (added by mojca (Mojca Miklavec), 11 years ago)
  • src/sdk/wxscintilla/src/PlatWX.cpp

    an upstream patch for clang compile error
    old new void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesire 
    299299    PenColour(fore);
    300300    BrushColour(back);
    301301/* 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;
    308310/* C::B end */
    309311}
    310312