Merge pull request #723 from PoignardAzur/add_override
Add override specifier to derived virtual methods
This commit is contained in:
commit
3a77d8db53
7 changed files with 23 additions and 23 deletions
|
@ -40,8 +40,8 @@ protected:
|
|||
//called from do_speak
|
||||
virtual void add_chat_message(const time_t& time,
|
||||
const std::string& speaker, int side, const std::string& message,
|
||||
MESSAGE_TYPE type=MESSAGE_PRIVATE)=0;
|
||||
virtual void send_chat_message(const std::string& message, bool allies_only=false)=0;
|
||||
MESSAGE_TYPE type=MESSAGE_PRIVATE) = 0;
|
||||
virtual void send_chat_message(const std::string& message, bool allies_only=false) = 0;
|
||||
|
||||
//Why are these virtual?
|
||||
virtual void send_whisper(const std::string& receiver, const std::string& message);
|
||||
|
|
|
@ -46,13 +46,13 @@ public:
|
|||
virtual unsigned get_state() const override;
|
||||
|
||||
/** Inherited from tclickable. */
|
||||
void connect_click_handler(const event::tsignal_function& signal)
|
||||
void connect_click_handler(const event::tsignal_function& signal) override
|
||||
{
|
||||
connect_signal_mouse_left_click(*this, signal);
|
||||
}
|
||||
|
||||
/** Inherited from tclickable. */
|
||||
void disconnect_click_handler(const event::tsignal_function& signal)
|
||||
void disconnect_click_handler(const event::tsignal_function& signal) override
|
||||
{
|
||||
disconnect_signal_mouse_left_click(*this, signal);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ private:
|
|||
virtual const std::string& get_control_type() const override;
|
||||
|
||||
/** Inherited from tcontrol. */
|
||||
void load_config_extra();
|
||||
void load_config_extra() override;
|
||||
|
||||
/***** ***** ***** signal handlers ***** ****** *****/
|
||||
|
||||
|
|
|
@ -239,16 +239,16 @@ protected:
|
|||
/***** ***** ***** ***** keyboard functions ***** ***** ***** *****/
|
||||
|
||||
/** Inherited from tscrollbar_container. */
|
||||
void handle_key_up_arrow(SDLMod modifier, bool& handled);
|
||||
void handle_key_up_arrow(SDLMod modifier, bool& handled) override;
|
||||
|
||||
/** Inherited from tscrollbar_container. */
|
||||
void handle_key_down_arrow(SDLMod modifier, bool& handled);
|
||||
void handle_key_down_arrow(SDLMod modifier, bool& handled) override;
|
||||
|
||||
/** Inherited from tscrollbar_container. */
|
||||
void handle_key_left_arrow(SDLMod modifier, bool& handled);
|
||||
void handle_key_left_arrow(SDLMod modifier, bool& handled) override;
|
||||
|
||||
/** Inherited from tscrollbar_container. */
|
||||
void handle_key_right_arrow(SDLMod modifier, bool& handled);
|
||||
void handle_key_right_arrow(SDLMod modifier, bool& handled) override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -343,7 +343,7 @@ private:
|
|||
void layout_children(const bool force);
|
||||
|
||||
/** Inherited from tscrollbar_container. */
|
||||
virtual void set_content_size(const tpoint& origin, const tpoint& size);
|
||||
virtual void set_content_size(const tpoint& origin, const tpoint& size) override;
|
||||
|
||||
/** See @ref tcontrol::get_control_type. */
|
||||
virtual const std::string& get_control_type() const override;
|
||||
|
|
|
@ -349,7 +349,7 @@ private:
|
|||
void move_positioner(const int distance);
|
||||
|
||||
/** Inherited from tcontrol. */
|
||||
void load_config_extra();
|
||||
void load_config_extra() override;
|
||||
|
||||
/***** ***** ***** signal handlers ***** ****** *****/
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ public:
|
|||
protected:
|
||||
void add_chat_message(const time_t& time, const std::string& speaker,
|
||||
int side, const std::string& message,
|
||||
events::chat_handler::MESSAGE_TYPE type=events::chat_handler::MESSAGE_PRIVATE);
|
||||
void send_chat_message(const std::string& message, bool allies_only=false);
|
||||
events::chat_handler::MESSAGE_TYPE type=events::chat_handler::MESSAGE_PRIVATE) override;
|
||||
void send_chat_message(const std::string& message, bool allies_only=false) override;
|
||||
private:
|
||||
//console_handler is basically a sliced out part of menu_handler
|
||||
//and as such needs access to menu_handler's privates
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
//event handler, overridden from observer
|
||||
//there is nothing to handle in this class actually but that might change in the future
|
||||
virtual void handle_generic_event(const std::string& /*name*/) {}
|
||||
virtual void handle_generic_event(const std::string& /*name*/) override {}
|
||||
|
||||
bool can_undo() const;
|
||||
bool can_redo() const;
|
||||
|
@ -193,7 +193,7 @@ public:
|
|||
|
||||
void do_consolesave(const std::string& filename);
|
||||
|
||||
events::mouse_handler& get_mouse_handler_base();
|
||||
events::mouse_handler& get_mouse_handler_base() override;
|
||||
events::menu_handler& get_menu_handler() { return menu_handler_; }
|
||||
|
||||
std::shared_ptr<wb::manager> get_whiteboard();
|
||||
|
@ -206,9 +206,9 @@ public:
|
|||
|
||||
int get_ticks();
|
||||
|
||||
virtual soundsource::manager* get_soundsource_man();
|
||||
virtual plugins_context* get_plugins_context();
|
||||
hotkey::command_executor* get_hotkey_command_executor();
|
||||
virtual soundsource::manager* get_soundsource_man() override;
|
||||
virtual plugins_context* get_plugins_context() override;
|
||||
hotkey::command_executor* get_hotkey_command_executor() override;
|
||||
|
||||
actions::undo_list& get_undo_stack() { return undo_stack(); }
|
||||
|
||||
|
@ -256,7 +256,7 @@ public:
|
|||
bool can_use_synced_wml_menu() const;
|
||||
std::set<std::string> all_players() const;
|
||||
int ticks() const { return ticks_; }
|
||||
game_display& get_display();
|
||||
game_display& get_display() override;
|
||||
|
||||
void update_savegame_snapshot() const;
|
||||
/**
|
||||
|
@ -276,10 +276,10 @@ protected:
|
|||
};
|
||||
friend struct scoped_savegame_snapshot;
|
||||
void play_slice_catch();
|
||||
bool have_keyboard_focus();
|
||||
void process_focus_keydown_event(const SDL_Event& event);
|
||||
void process_keydown_event(const SDL_Event& event);
|
||||
void process_keyup_event(const SDL_Event& event);
|
||||
bool have_keyboard_focus() override;
|
||||
void process_focus_keydown_event(const SDL_Event& event) override;
|
||||
void process_keydown_event(const SDL_Event& event) override;
|
||||
void process_keyup_event(const SDL_Event& event) override;
|
||||
|
||||
void init_managers();
|
||||
///preload events cannot be synced
|
||||
|
|
Loading…
Add table
Reference in a new issue