Opened 5 years ago

Closed 19 months ago

#10712 closed defect (fixed)

Make wxDC::DrawLines(), DrawPolygon() and DrawPolyPolygon() accept const points array

Reported by: vadz Owned by:
Priority: normal Milestone: 3.0.0
Component: GUI-all Version:
Keywords: wxDC const simple API Cc:
Blocked By: Blocking:
Patch: no

Description

Currently code such as

    const std::vector<wxPoint> points;
    ...
    dc.DrawPolygon(points.size(), const_cast<wxPoint *>(&points[0]));

needs this ugly const_cast which is unfortunate as the array is not modified by the drawing function, of course. This must be fixed.

Change History (1)

comment:1 Changed 19 months ago by PC

  • Resolution set to fixed
  • Status changed from new to closed

(In [73382]) use const arrays for wxDC array parameters, closes #10712

Note: See TracTickets for help on using tickets.