mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +00:00
Everywhere: Mark overridden methods 'override'
This is good practice, and fixes some IDE warnings.
This commit is contained in:
parent
2e6bb987a3
commit
6b75a4dfc3
5 changed files with 9 additions and 9 deletions
|
@ -20,7 +20,7 @@ public:
|
|||
Engine(const Engine&) = delete;
|
||||
Engine& operator=(const Engine&) = delete;
|
||||
|
||||
virtual void handle_bestmove(const Chess::UCI::BestMoveCommand&);
|
||||
virtual void handle_bestmove(const Chess::UCI::BestMoveCommand&) override;
|
||||
|
||||
template<typename Callback>
|
||||
void get_best_move(const Chess::Board& board, int time_limit, Callback&& callback)
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
|
||||
void send_command(const Command&);
|
||||
|
||||
virtual void event(Core::Event&);
|
||||
virtual void event(Core::Event&) override;
|
||||
|
||||
Core::IODevice& in() { return *m_in; }
|
||||
Core::IODevice& out() { return *m_out; }
|
||||
|
|
|
@ -80,7 +80,7 @@ private:
|
|||
virtual void mousemove_event(GUI::MouseEvent&) override;
|
||||
virtual void mousedown_event(MouseEvent&) override;
|
||||
virtual void mouseup_event(MouseEvent&) override;
|
||||
virtual void doubleclick_event(MouseEvent&);
|
||||
virtual void doubleclick_event(MouseEvent&) override;
|
||||
virtual void leave_event(Core::Event&) override;
|
||||
|
||||
struct Day {
|
||||
|
|
|
@ -156,8 +156,8 @@ public:
|
|||
Function<void(Color)> on_color_changed;
|
||||
|
||||
private:
|
||||
virtual void mousedown_event(GUI::MouseEvent&) { m_event_loop->quit(1); }
|
||||
virtual void mousemove_event(GUI::MouseEvent&)
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override { m_event_loop->quit(1); }
|
||||
virtual void mousemove_event(GUI::MouseEvent&) override
|
||||
{
|
||||
auto new_col = WindowServerConnection::the().get_color_under_cursor();
|
||||
if (new_col == m_col)
|
||||
|
@ -167,7 +167,7 @@ private:
|
|||
on_color_changed(m_col);
|
||||
}
|
||||
|
||||
virtual void keydown_event(GUI::KeyEvent& event)
|
||||
virtual void keydown_event(GUI::KeyEvent& event) override
|
||||
{
|
||||
if (event.key() == KeyCode::Key_Escape) {
|
||||
event.accept();
|
||||
|
|
|
@ -20,9 +20,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void handle_uci();
|
||||
virtual void handle_position(const Chess::UCI::PositionCommand&);
|
||||
virtual void handle_go(const Chess::UCI::GoCommand&);
|
||||
virtual void handle_uci() override;
|
||||
virtual void handle_position(const Chess::UCI::PositionCommand&) override;
|
||||
virtual void handle_go(const Chess::UCI::GoCommand&) override;
|
||||
|
||||
private:
|
||||
Chess::Board m_board;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue