From ff4cf80891ad0ca4064988200f06aa66b529bcdc Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:10:34 +0100 Subject: Avoid using same name (p) for distinct members of derived classes - cont'd. --- src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx index 8deb3f51d..441bddd70 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx @@ -29,7 +29,7 @@ void Fl_GDI_Graphics_Driver::end_points() { - for (int i=0; i1) Polyline(gc_, p, n); + if (n>1) Polyline(gc_, long_point, n); } void Fl_GDI_Graphics_Driver::end_loop() { fixloop(); - if (n>2) transformed_vertex0(float(p[0].x), float(p[0].y)); + if (n>2) transformed_vertex0(float(long_point[0].x), float(long_point[0].y)); end_line(); } @@ -54,7 +54,7 @@ void Fl_GDI_Graphics_Driver::end_polygon() { } if (n>2) { SelectObject(gc_, fl_brush()); - Polygon(gc_, p, n); + Polygon(gc_, long_point, n); } } @@ -64,9 +64,9 @@ void Fl_GDI_Graphics_Driver::begin_complex_polygon() { } void Fl_GDI_Graphics_Driver::gap() { - while (n>gap_+2 && p[n-1].x == p[gap_].x && p[n-1].y == p[gap_].y) n--; + while (n>gap_+2 && long_point[n-1].x == long_point[gap_].x && long_point[n-1].y == long_point[gap_].y) n--; if (n > gap_+2) { - transformed_vertex0(float(p[gap_].x), float(p[gap_].y)); + transformed_vertex0(float(long_point[gap_].x), float(long_point[gap_].y)); counts[numcount++] = n-gap_; gap_ = n; } else { @@ -82,7 +82,7 @@ void Fl_GDI_Graphics_Driver::end_complex_polygon() { } if (n>2) { SelectObject(gc_, fl_brush()); - PolyPolygon(gc_, p, counts, numcount); + PolyPolygon(gc_, long_point, counts, numcount); } } @@ -113,7 +113,7 @@ void Fl_GDIplus_Graphics_Driver::vertex(double x,double y) { void Fl_GDIplus_Graphics_Driver::end_points() { if (!active) return Fl_GDI_Graphics_Driver::end_points(); - for (int i = 0; i < n; i++) point(p[i].x, p[i].y); + for (int i = 0; i < n; i++) point(long_point[i].x, long_point[i].y); } void Fl_GDIplus_Graphics_Driver::end_line() { @@ -126,7 +126,7 @@ void Fl_GDIplus_Graphics_Driver::end_line() { Gdiplus::GraphicsPath path; Gdiplus::Point *gdi2_p = new Gdiplus::Point[n]; for (int i = 0; i < n; i++) { - gdi2_p[i] = Gdiplus::Point(p[i].x, p[i].y); + gdi2_p[i] = Gdiplus::Point(long_point[i].x, long_point[i].y); } path.AddLines(gdi2_p, n); delete[] gdi2_p; @@ -145,7 +145,7 @@ void Fl_GDIplus_Graphics_Driver::end_loop() { Gdiplus::GraphicsPath path; Gdiplus::Point *gdi2_p = new Gdiplus::Point[n]; for (int i = 0; i < n; i++) { - gdi2_p[i] = Gdiplus::Point(p[i].x, p[i].y); + gdi2_p[i] = Gdiplus::Point(long_point[i].x, long_point[i].y); } path.AddLines(gdi2_p, n); path.CloseFigure(); @@ -169,7 +169,7 @@ void Fl_GDIplus_Graphics_Driver::end_polygon() { Gdiplus::GraphicsPath path; Gdiplus::Point *gdi2_p = new Gdiplus::Point[n]; for (int i = 0; i < n; i++) { - gdi2_p[i] = Gdiplus::Point(p[i].x, p[i].y); + gdi2_p[i] = Gdiplus::Point(long_point[i].x, long_point[i].y); } path.AddPolygon(gdi2_p, n); delete[] gdi2_p; @@ -193,7 +193,7 @@ void Fl_GDIplus_Graphics_Driver::end_complex_polygon() { Gdiplus::GraphicsPath path; Gdiplus::Point *gdi2_p = new Gdiplus::Point[n]; for (int i = 0; i < n; i++) { - gdi2_p[i] = Gdiplus::Point(p[i].x, p[i].y); + gdi2_p[i] = Gdiplus::Point(long_point[i].x, long_point[i].y); } path.AddPolygon(gdi2_p, n); delete[] gdi2_p; -- cgit v1.2.3