mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 06:21:26 +08:00
Fl_Shortcut_Button: Silence compiler warnings
Part 1: [-Wreorder] 'shortcut_value’ will be initialized after ... Part 2: [-Wunused] unused variable 'Y'
This commit is contained in:
@@ -49,8 +49,8 @@ Fl_Shortcut_Button::Fl_Shortcut_Button(int X,int Y,int W,int H, const char* l)
|
||||
default_set_(false),
|
||||
handle_default_button_(false),
|
||||
pre_esc_(0),
|
||||
shortcut_value(0),
|
||||
default_shortcut_(0)
|
||||
default_shortcut_(0),
|
||||
shortcut_value(0)
|
||||
{
|
||||
box(FL_DOWN_BOX);
|
||||
selection_color(FL_SELECTION_COLOR);
|
||||
@@ -159,7 +159,6 @@ int Fl_Shortcut_Button::handle(int e) {
|
||||
bool inside_default_button = false;
|
||||
if (default_set_ && ( (e == FL_PUSH) || (e == FL_DRAG) || (e == FL_RELEASE) ) ) {
|
||||
int X = x() + Fl::box_dx(box());
|
||||
int Y = y() + Fl::box_dy(box());
|
||||
int W = w() - Fl::box_dw(box());
|
||||
int H = h() - Fl::box_dh(box());
|
||||
if (Fl::event_inside(this) && (Fl::event_x() > X+W-H))
|
||||
|
||||
Reference in New Issue
Block a user