From d87b62ea6924c80127ce82b01ad91ea80ace5d73 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 21 Mar 2022 15:56:50 +0100 Subject: Avoid using same name (p) for distinct members of derived classes. --- src/Fl_Graphics_Driver.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Fl_Graphics_Driver.cxx') diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 0ac1a377e..1b617ff16 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -54,6 +54,12 @@ Fl_Graphics_Driver::Fl_Graphics_Driver() xpoint = NULL; }; +/** Destructor */ +Fl_Graphics_Driver::~Fl_Graphics_Driver() { + if (xpoint) free(xpoint); +} + + /** Return the graphics driver used when drawing to the platform's display */ Fl_Graphics_Driver &Fl_Graphics_Driver::default_driver() { @@ -532,7 +538,7 @@ void Fl_Graphics_Driver::fixloop() { // remove equal points from closed path /** see fl_end_loop() */ void Fl_Graphics_Driver::end_loop() { fixloop(); - if (n>2) transformed_vertex((float)xpoint[0].x, (float)xpoint[0].y); + if (n>2) transformed_vertex(xpoint[0].x, xpoint[0].y); end_line(); } -- cgit v1.2.3