Ticket #10712 (closed defect: fixed)

Opened 4 years ago

Last modified 5 months ago

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

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

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

Changed 5 months ago by PC

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.