summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-21 15:56:50 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-21 15:56:50 +0100
commitd87b62ea6924c80127ce82b01ad91ea80ace5d73 (patch)
tree61e56c8484ffeaa8965f256fa59fa41565665b78 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
parentbf5b902180f0e5654f5802cf9ef588ecf57d20c6 (diff)
Avoid using same name (p) for distinct members of derived classes.
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
index 697acecb3..8a9380486 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
@@ -1,7 +1,7 @@
//
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2018 by Bill Spitzak and others.
+// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -42,7 +42,7 @@ GC fl_gc = 0;
Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) {
mask_bitmap_ = NULL;
- p = NULL;
+ short_point = NULL;
#if USE_PANGO
Fl_Graphics_Driver::font(0, 0);
#endif
@@ -52,7 +52,7 @@ Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) {
}
Fl_Xlib_Graphics_Driver::~Fl_Xlib_Graphics_Driver() {
- if (p) free(p);
+ if (short_point) free(short_point);
}
@@ -85,19 +85,19 @@ void Fl_Xlib_Graphics_Driver::add_rectangle_to_region(Fl_Region r, int X, int Y,
void Fl_Xlib_Graphics_Driver::transformed_vertex0(float fx, float fy) {
short x = short(fx), y = short(fy);
- if (!n || x != p[n-1].x || y != p[n-1].y) {
+ if (!n || x != short_point[n-1].x || y != short_point[n-1].y) {
if (n >= p_size) {
- p_size = p ? 2*p_size : 16;
- p = (XPOINT*)realloc((void*)p, p_size*sizeof(*p));
+ p_size = short_point ? 2*p_size : 16;
+ short_point = (XPoint*)realloc((void*)short_point, p_size*sizeof(*short_point));
}
- p[n].x = x ;
- p[n].y = y ;
+ short_point[n].x = x ;
+ short_point[n].y = y ;
n++;
}
}
void Fl_Xlib_Graphics_Driver::fixloop() { // remove equal points from closed path
- while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
+ while (n>2 && short_point[n-1].x == short_point[0].x && short_point[n-1].y == short_point[0].y) n--;
}
// FIXME: should be members of Fl_Xlib_Graphics_Driver