diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-12-30 19:14:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-30 19:14:36 +0100 |
| commit | 44c874b731f9f58c2f50c3c6076371058cbe26e3 (patch) | |
| tree | 2386dfcc700c41a1109fc78b96875c11056abcc9 /test/device.cxx | |
| parent | f58a93a159105336136ce6e54ab7fc161e4fa15a (diff) | |
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
Diffstat (limited to 'test/device.cxx')
| -rw-r--r-- | test/device.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/device.cxx b/test/device.cxx index 0a0d64081..b1ab2e7a2 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -36,7 +36,7 @@ class MyWidget: public Fl_Box{ protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_color(FL_RED); fl_rectf(x()+5,y()+5,w()-10,h()-10); @@ -66,7 +66,7 @@ public: class MyWidget2: public Fl_Box { protected: - void draw() { + void draw() FL_OVERRIDE { Fl_Box::draw(); int d; // fl_line_style(0); @@ -171,7 +171,7 @@ public: class MyWidget3: public Fl_Box { protected: - void draw() { + void draw() FL_OVERRIDE { Fl_Box::draw(); double d; // fl_line_style(0); @@ -203,7 +203,7 @@ public: class MyWidget4: public Fl_Box{ protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_push_matrix(); fl_translate(x(),y()); @@ -365,7 +365,7 @@ public: class MyWidget5: public Fl_Box { protected: - void draw(){ + void draw() FL_OVERRIDE { Fl_Box::draw(); fl_push_matrix(); @@ -622,7 +622,7 @@ void copy(Fl_Widget *, void *data) { class My_Button:public Fl_Button { protected: - void draw() { + void draw() FL_OVERRIDE { if (type() == FL_HIDDEN_BUTTON) return; Fl_Color col = value() ? selection_color() : color(); draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col); |
