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 /FL/Fl_Window.H | |
| 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 'FL/Fl_Window.H')
| -rw-r--r-- | FL/Fl_Window.H | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index c7ecb416d..ddb3283eb 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -93,7 +93,7 @@ protected: /** Stores the last window that was made current. See current() const */ static Fl_Window *current_; - void draw(); + void draw() FL_OVERRIDE; /** Forces the window to be drawn, this window is also made current and calls draw(). */ virtual void flush(); @@ -170,7 +170,7 @@ public: */ virtual ~Fl_Window(); - virtual int handle(int); + int handle(int) FL_OVERRIDE; /** Changes the size and position of the window. If shown() is true, @@ -188,7 +188,7 @@ public: dimensions. It is up to the application developer to verify window parameters after the resize request. */ - virtual void resize(int X,int Y,int W,int H); + void resize(int X,int Y,int W,int H) FL_OVERRIDE; /** Sets whether or not the window manager border is around the window. The default value is true. <I>With some X window managers, this does not work after show() has been called.</I> @@ -201,9 +201,9 @@ public: void clear_border() {set_flag(NOBORDER);} /** Returns whether the window possesses a border */ unsigned int border() const {return !(flags() & NOBORDER);} - /** Activates the flags NOBORDER|FL_OVERRIDE */ + /** Activates the flags NOBORDER|OVERRIDE */ void set_override() {set_flag(NOBORDER|OVERRIDE);} - /** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */ + /** Returns non zero if OVERRIDE flag is set, 0 otherwise. */ unsigned int override() const { return flags()&OVERRIDE; } /** A "modal" window, when shown(), will prevent any events from @@ -424,12 +424,12 @@ public: \see Fl_Window::show(int argc, char **argv) */ - virtual void show(); + void show() FL_OVERRIDE; /** Removes the window from the screen. If the window is already hidden or has not been shown then this does nothing and is harmless. */ - virtual void hide(); + void hide() FL_OVERRIDE; /** Puts the window on the screen and parses command-line arguments. @@ -567,7 +567,7 @@ public: int decorated_h() const; // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. - virtual Fl_Window* as_window() { return this; } + Fl_Window* as_window() FL_OVERRIDE { return this; } /** Return non-null if this is an Fl_Overlay_Window object. |
