diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-07-28 17:42:18 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-07-28 17:42:59 +0200 |
| commit | b9a89c92ea38f784e0f02ab143c3cc07e797e0ef (patch) | |
| tree | b9a53293641de77cd770e2a2103724f5ea9cee35 | |
| parent | d9fa2c6082da533555c3655a4808622fa7c9fd11 (diff) | |
Fl_Shortcut_Button: Silence compiler warnings
Part 1: [-Wreorder] 'shortcut_value’ will be initialized after ...
Part 2: [-Wunused] unused variable 'Y'
| -rw-r--r-- | src/Fl_Shortcut_Button.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_Shortcut_Button.cxx b/src/Fl_Shortcut_Button.cxx index f6d38c6b0..f7d1d5b25 100644 --- a/src/Fl_Shortcut_Button.cxx +++ b/src/Fl_Shortcut_Button.cxx @@ -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)) |
