From 26fcf2b04ca48566cee6cf32a2a40e8ea1e40eb4 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Fri, 10 Jul 2020 11:34:39 +0100 Subject: Add override keywords. --- core/input/input.h | 2 +- core/input/input_event.h | 76 ++++++++++++++++++++++++------------------------ 2 files changed, 39 insertions(+), 39 deletions(-) (limited to 'core/input') diff --git a/core/input/input.h b/core/input/input.h index 91e3b83b95..775663503b 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -255,7 +255,7 @@ protected: public: void set_mouse_mode(MouseMode p_mode); MouseMode get_mouse_mode() const; - void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const; + void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; static Input *get_singleton(); diff --git a/core/input/input_event.h b/core/input/input_event.h index dd1cc11982..815ba5ae80 100644 --- a/core/input/input_event.h +++ b/core/input/input_event.h @@ -266,7 +266,7 @@ protected: public: void set_pressed(bool p_pressed); - virtual bool is_pressed() const; + virtual bool is_pressed() const override; void set_keycode(uint32_t p_keycode); uint32_t get_keycode() const; @@ -278,17 +278,17 @@ public: uint32_t get_unicode() const; void set_echo(bool p_enable); - virtual bool is_echo() const; + virtual bool is_echo() const override; uint32_t get_keycode_with_modifiers() const; uint32_t get_physical_keycode_with_modifiers() const; - virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; - virtual bool shortcut_match(const Ref &p_event) const; + virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const override; + virtual bool shortcut_match(const Ref &p_event) const override; - virtual bool is_action_type() const { return true; } + virtual bool is_action_type() const override { return true; } - virtual String as_text() const; + virtual String as_text() const override; InputEventKey() {} }; @@ -336,16 +336,16 @@ public: int get_button_index() const; void set_pressed(bool p_pressed); - virtual bool is_pressed() const; + virtual bool is_pressed() const override; void set_doubleclick(bool p_doubleclick); bool is_doubleclick() const; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const override; - virtual bool is_action_type() const { return true; } - virtual String as_text() const; + virtual bool is_action_type() const override { return true; } + virtual String as_text() const override; InputEventMouseButton() {} }; @@ -374,10 +374,10 @@ public: void set_speed(const Vector2 &p_speed); Vector2 get_speed() const; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual String as_text() const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual String as_text() const override; - virtual bool accumulate(const Ref &p_event); + virtual bool accumulate(const Ref &p_event) override; InputEventMouseMotion() {} }; @@ -397,12 +397,12 @@ public: void set_axis_value(float p_value); float get_axis_value() const; - virtual bool is_pressed() const; + virtual bool is_pressed() const override; - virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; + virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const override; - virtual bool is_action_type() const { return true; } - virtual String as_text() const; + virtual bool is_action_type() const override { return true; } + virtual String as_text() const override; InputEventJoypadMotion() {} }; @@ -421,16 +421,16 @@ public: int get_button_index() const; void set_pressed(bool p_pressed); - virtual bool is_pressed() const; + virtual bool is_pressed() const override; void set_pressure(float p_pressure); float get_pressure() const; - virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; - virtual bool shortcut_match(const Ref &p_event) const; + virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const override; + virtual bool shortcut_match(const Ref &p_event) const override; - virtual bool is_action_type() const { return true; } - virtual String as_text() const; + virtual bool is_action_type() const override { return true; } + virtual String as_text() const override; InputEventJoypadButton() {} }; @@ -452,10 +452,10 @@ public: Vector2 get_position() const; void set_pressed(bool p_pressed); - virtual bool is_pressed() const; + virtual bool is_pressed() const override; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual String as_text() const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual String as_text() const override; InputEventScreenTouch() {} }; @@ -483,8 +483,8 @@ public: void set_speed(const Vector2 &p_speed); Vector2 get_speed() const; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual String as_text() const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual String as_text() const override; InputEventScreenDrag() {} }; @@ -504,18 +504,18 @@ public: StringName get_action() const; void set_pressed(bool p_pressed); - virtual bool is_pressed() const; + virtual bool is_pressed() const override; void set_strength(float p_strength); float get_strength() const; virtual bool is_action(const StringName &p_action) const; - virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const; + virtual bool action_match(const Ref &p_event, bool *p_pressed, float *p_strength, float p_deadzone) const override; - virtual bool shortcut_match(const Ref &p_event) const; - virtual bool is_action_type() const { return true; } - virtual String as_text() const; + virtual bool shortcut_match(const Ref &p_event) const override; + virtual bool is_action_type() const override { return true; } + virtual String as_text() const override; InputEventAction() {} }; @@ -544,8 +544,8 @@ public: void set_factor(real_t p_factor); real_t get_factor() const; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual String as_text() const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual String as_text() const override; InputEventMagnifyGesture() {} }; @@ -561,8 +561,8 @@ public: void set_delta(const Vector2 &p_delta); Vector2 get_delta() const; - virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const; - virtual String as_text() const; + virtual Ref xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const override; + virtual String as_text() const override; InputEventPanGesture() {} }; @@ -607,7 +607,7 @@ public: void set_controller_value(const int p_controller_value); int get_controller_value() const; - virtual String as_text() const; + virtual String as_text() const override; InputEventMIDI() {} }; -- cgit v1.2.3