diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 15:56:50 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-03-21 15:56:50 +0100 |
| commit | d87b62ea6924c80127ce82b01ad91ea80ace5d73 (patch) | |
| tree | 61e56c8484ffeaa8965f256fa59fa41565665b78 /src/Fl_Graphics_Driver.cxx | |
| parent | bf5b902180f0e5654f5802cf9ef588ecf57d20c6 (diff) | |
Avoid using same name (p) for distinct members of derived classes.
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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(); } |
