DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2714
Version: 1.3-current
Building application code with FLTK can't reasonably use gcc's -Wshadow,
because FLTK's headers have shadow lint. While it would be nice if the
entire FLTK code base were warning-free even with -Wshadow, the attached
patch just fixes the headers, so application code can turn on that warning
switch without chatter from the FLTK headers. Patch against fltk-1.3 svn
9049.
Link: http://www.fltk.org/str.php?L2714
Version: 1.3-current
Index: FL/Fl_Input_Choice.H
===================================================================
--- FL/Fl_Input_Choice.H (revision 9049)
+++ FL/Fl_Input_Choice.H (working copy)
@@ -56,8 +56,8 @@
if (Fl::focus() == this) draw_focus();
}
public:
- InputMenuButton(int x,int y,int w,int h,const char*l=0) :
- Fl_Menu_Button(x,y,w,h,l) { box(FL_UP_BOX); }
+ InputMenuButton(int x__,int y__,int w__,int h__,const char*l=0) :
+ Fl_Menu_Button(x__,y__,w__,h__,l) { box(FL_UP_BOX); }
};
Fl_Input *inp_;
@@ -128,7 +128,7 @@
and label string.
<P> Inherited destructor Destroys the widget and any value associated with
it.
*/
- Fl_Input_Choice (int x,int y,int w,int h,const char*l=0) :
Fl_Group(x,y,w,h,l) {
+ Fl_Input_Choice (int x__,int y__,int w__,int h__,const char*l=0) :
Fl_Group(x__,y__,w__,h__,l) {
Fl_Group::box(FL_DOWN_BOX);
align(FL_ALIGN_LEFT); // default like Fl_Input
inp_ = new Fl_Input(inp_x(), inp_y(),
Index: FL/Fl_Round_Clock.H
===================================================================
--- FL/Fl_Round_Clock.H (revision 9049)
+++ FL/Fl_Round_Clock.H (working copy)
@@ -28,8 +28,8 @@
class FL_EXPORT Fl_Round_Clock : public Fl_Clock {
public:
/** Creates the clock widget, setting his type and box. */
- Fl_Round_Clock(int x,int y,int w,int h, const char *l = 0)
- : Fl_Clock(x,y,w,h,l) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);}
+ Fl_Round_Clock(int x__,int y__,int w__,int h__, const char *l = 0)
+ : Fl_Clock(x__,y__,w__,h__,l) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);}
};
#endif
Index: FL/Fl_Tree.H
===================================================================
--- FL/Fl_Tree.H (revision 9049)
+++ FL/Fl_Tree.H (working copy)
@@ -253,9 +253,9 @@
if ( item == _root ) {
clear();
} else {
- Fl_Tree_Item *parent = item->parent(); // find item's parent
- if ( ! parent ) return(-1);
- parent->remove_child(item); // remove child +
children
+ Fl_Tree_Item *parent__ = item->parent(); // find item's parent
+ if ( ! parent__ ) return(-1);
+ parent__->remove_child(item); // remove child +
children
}
return(0);
}
@@ -918,8 +918,8 @@
/// \param[in] w Widget to test
/// \returns 1 if \p w is a scrollbar, 0 if not.
///
- int is_scrollbar(Fl_Widget *w) {
- return( ( w == _vscroll ) ? 1 : 0 );
+ int is_scrollbar(Fl_Widget *w__) {
+ return( ( w__ == _vscroll ) ? 1 : 0 );
}
/// Gets the current size of the scrollbars' troughs, in pixels.
///
@@ -950,8 +950,8 @@
/// If 0 (default), scrollbar size tracks the global
Fl::scrollbar_size()
/// \see Fl::scrollbar_size()
///
- void scrollbar_size(int size) {
- _scrollbar_size = size;
+ void scrollbar_size(int size_) {
+ _scrollbar_size = size_;
int scrollsize = _scrollbar_size ? _scrollbar_size :
Fl::scrollbar_size();
if ( _vscroll->w() != scrollsize ) {
_vscroll->resize(x()+w()-scrollsize, h(), scrollsize, _vscroll->h());
Index: FL/Fl_Browser_.H
===================================================================
--- FL/Fl_Browser_.H (revision 9049)
+++ FL/Fl_Browser_.H (working copy)
@@ -283,7 +283,7 @@
/**
Sets the default text size (in pixels) for the lines in the browser to \p
size.
*/
- void textsize(Fl_Fontsize size) { textsize_ = size; }
+ void textsize(Fl_Fontsize size_) { textsize_ = size_; }
/**
Gets the default text color for the lines in the browser.
@@ -325,8 +325,8 @@
If 0 (default), scrollbar size tracks the global
Fl::scrollbar_size()
\see Fl::scrollbar_size()
*/
- void scrollbar_size(int size) {
- scrollbar_size_ = size;
+ void scrollbar_size(int size_) {
+ scrollbar_size_ = size_;
}
/**
This method has been deprecated, existing for backwards compatibility only.
Index: FL/Fl_Radio_Button.H
===================================================================
--- FL/Fl_Radio_Button.H (revision 9049)
+++ FL/Fl_Radio_Button.H (working copy)
@@ -26,8 +26,8 @@
class FL_EXPORT Fl_Radio_Button : public Fl_Button {
public:
- Fl_Radio_Button(int x,int y,int w,int h,const char *l=0)
- : Fl_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);}
+ Fl_Radio_Button(int x__,int y__,int w__,int h__,const char *l=0)
+ : Fl_Button(x__,y__,w__,h__,l) {type(FL_RADIO_BUTTON);}
};
#endif
Index: FL/Fl_Widget.H
===================================================================
--- FL/Fl_Widget.H (revision 9049)
+++ FL/Fl_Widget.H (working copy)
@@ -857,7 +857,7 @@
\param[in] w the possible parent widget.
\see contains()
*/
- int inside(const Fl_Widget* w) const {return w ? w->contains(this) : 0;}
+ int inside(const Fl_Widget* w__) const {return w__ ? w__->contains(this) :
0;}
/** Schedules the drawing of the widget.
Marks the widget as needing its draw() routine called.
Index: FL/Fl_Table.H
===================================================================
--- FL/Fl_Table.H (revision 9049)
+++ FL/Fl_Table.H (working copy)
@@ -449,19 +449,19 @@
void damage_zone(int r1, int c1, int r2, int c2, int r3 = 0, int c3 = 0);
- void redraw_range(int toprow, int botrow, int leftcol, int rightcol) {
+ void redraw_range(int toprow_, int botrow_, int leftcol_, int rightcol_) {
if ( _redraw_toprow == -1 ) {
// Initialize redraw range
- _redraw_toprow = toprow;
- _redraw_botrow = botrow;
- _redraw_leftcol = leftcol;
- _redraw_rightcol = rightcol;
+ _redraw_toprow = toprow_;
+ _redraw_botrow = botrow_;
+ _redraw_leftcol = leftcol_;
+ _redraw_rightcol = rightcol_;
} else {
// Extend redraw range
- if ( toprow < _redraw_toprow ) _redraw_toprow = toprow;
- if ( botrow > _redraw_botrow ) _redraw_botrow = botrow;
- if ( leftcol < _redraw_leftcol ) _redraw_leftcol = leftcol;
- if ( rightcol > _redraw_rightcol ) _redraw_rightcol = rightcol;
+ if ( toprow_ < _redraw_toprow ) _redraw_toprow = toprow_;
+ if ( botrow_ > _redraw_botrow ) _redraw_botrow = botrow_;
+ if ( leftcol_ < _redraw_leftcol ) _redraw_leftcol = leftcol_;
+ if ( rightcol_ > _redraw_rightcol ) _redraw_rightcol = rightcol_;
}
// Indicate partial redraw needed of some cells
@@ -852,25 +852,25 @@
table->init_sizes();
table->redraw();
}
- void add(Fl_Widget& w) {
- table->add(w);
+ void add(Fl_Widget& w__) {
+ table->add(w__);
if ( table->children() > 2 ) {
table->show();
} else {
table->hide();
}
}
- void add(Fl_Widget* w) {
- add(*w);
+ void add(Fl_Widget* w__) {
+ add(*w__);
}
- void insert(Fl_Widget& w, int n) {
- table->insert(w,n);
+ void insert(Fl_Widget& w__, int n) {
+ table->insert(w__,n);
}
- void insert(Fl_Widget& w, Fl_Widget* w2) {
- table->insert(w,w2);
+ void insert(Fl_Widget& w__, Fl_Widget* w2) {
+ table->insert(w__,w2);
}
- void remove(Fl_Widget& w) {
- table->remove(w);
+ void remove(Fl_Widget& w__) {
+ table->remove(w__);
}
void begin() {
table->begin();
@@ -920,11 +920,11 @@
int children() const {
return(table->children()-2); // -2: skip Fl_Scroll's h/v scrollbar
widgets
}
- int find(const Fl_Widget *w) const {
- return(table->find(w));
+ int find(const Fl_Widget *w__) const {
+ return(table->find(w__));
}
- int find(const Fl_Widget &w) const {
- return(table->find(w));
+ int find(const Fl_Widget &w__) const {
+ return(table->find(w__));
}
// CALLBACKS
Index: FL/fl_draw.H
===================================================================
--- FL/fl_draw.H (revision 9049)
+++ FL/fl_draw.H (working copy)
@@ -488,7 +488,7 @@
The size of the font is measured in pixels and not "points".
Lines should be spaced \p size pixels apart or more.
*/
-inline void fl_font(Fl_Font face, Fl_Fontsize size) {
fl_graphics_driver->font(face,size); }
+inline void fl_font(Fl_Font face, Fl_Fontsize size_) {
fl_graphics_driver->font(face,size_); }
/**
Returns the \p face set by the most recent call to fl_font().
Index: FL/Fl_Device.H
===================================================================
--- FL/Fl_Device.H (revision 9049)
+++ FL/Fl_Device.H (working copy)
@@ -364,7 +364,7 @@
static const char *class_id;
virtual const char *class_name() {return class_id;};
/** \brief see fl_font(Fl_Font face, Fl_Fontsize size). */
- virtual void font(Fl_Font face, Fl_Fontsize size) {font_ = face; size_ =
size;}
+ virtual void font(Fl_Font face, Fl_Fontsize size__) {font_ = face; size_ =
size__;}
/** \brief see fl_font(void). */
Fl_Font font() {return font_; }
/** \brief see fl_size(). */
@@ -529,8 +529,8 @@
class FL_EXPORT Fl_Device_Plugin : public Fl_Plugin {
public:
/** \brief The constructor */
- Fl_Device_Plugin(const char *name)
- : Fl_Plugin(klass(), name) { }
+ Fl_Device_Plugin(const char *name__)
+ : Fl_Plugin(klass(), name__) { }
/** \brief Returns the class name */
virtual const char *klass() { return "fltk:device"; }
/** \brief Returns the plugin name */
Index: FL/Fl_PostScript.H
===================================================================
--- FL/Fl_PostScript.H (revision 9049)
+++ FL/Fl_PostScript.H (working copy)
@@ -184,7 +184,7 @@
void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int
h, int delta=3);
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w,
int h, int delta=1);
- void draw(const char* s, int n, int x, int y) {transformed_draw(s,n,x,y); };
+ void draw(const char* s, int n_, int x, int y) {transformed_draw(s,n_,x,y);
};
#ifdef __APPLE__
void draw(const char* s, int n, float x, float y)
{transformed_draw(s,n,x,y); };
#endif
Index: FL/x.H
===================================================================
--- FL/x.H (revision 9049)
+++ FL/x.H (working copy)
@@ -165,7 +165,7 @@
extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
extern FL_EXPORT int fl_background_pixel; // hack into Fl_X::make_xid()
-inline Window fl_xid(const Fl_Window* w) { Fl_X *temp = Fl_X::i(w); return
temp ? temp->xid : 0; }
+inline Window fl_xid(const Fl_Window* w) { Fl_X *temp2 = Fl_X::i(w); return
temp2 ? temp2->xid : 0; }
#else
Index: FL/Fl_Scroll.H
===================================================================
--- FL/Fl_Scroll.H (revision 9049)
+++ FL/Fl_Scroll.H (working copy)
@@ -177,9 +177,9 @@
If 0 (default), scrollbar size tracks the global
Fl::scrollbar_size()
\see Fl::scrollbar_size()
*/
- void scrollbar_size(int size) {
- if ( size != scrollbar_size_ ) redraw();
- scrollbar_size_ = size;
+ void scrollbar_size(int size_) {
+ if ( size_ != scrollbar_size_ ) redraw();
+ scrollbar_size_ = size_;
}
};
Index: FL/Fl_Input_.H
===================================================================
--- FL/Fl_Input_.H (revision 9049)
+++ FL/Fl_Input_.H (working copy)
@@ -202,7 +202,7 @@
/** \internal Vertical offset of text to top edge of widget. */
int yscroll() const {return yscroll_;}
- void yscroll(int y) { yscroll_ = y; damage(FL_DAMAGE_EXPOSE);}
+ void yscroll(int y__) { yscroll_ = y__; damage(FL_DAMAGE_EXPOSE);}
/* Return the number of lines displayed on a single page. */
int linesPerPage();
Index: FL/Fl_Help_View.H
===================================================================
--- FL/Fl_Help_View.H (revision 9049)
+++ FL/Fl_Help_View.H (working copy)
@@ -375,8 +375,8 @@
If 0 (default), scrollbar size tracks the global
Fl::scrollbar_size()
\see Fl::scrollbar_size()
*/
- void scrollbar_size(int size) {
- scrollbar_size_ = size;
+ void scrollbar_size(int size__) {
+ scrollbar_size_ = size__;
}
};
Index: FL/Fl_Scrollbar.H
===================================================================
--- FL/Fl_Scrollbar.H (revision 9049)
+++ FL/Fl_Scrollbar.H (working copy)
@@ -86,8 +86,8 @@
Calls Fl_Slider::scrollvalue(int pos, int size, int first, int total).
*/
- int value(int pos, int size, int first, int total) {
- return scrollvalue(pos, size, first, total);
+ int value(int pos, int size__, int first, int total) {
+ return scrollvalue(pos, size__, first, total);
}
/**
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs