소스 검색

Everywhere: Mark overridden methods 'override'

This is good practice, and fixes some IDE warnings.
Ben Wiederhake 3 년 전
부모
커밋
6b75a4dfc3

+ 1 - 1
Userland/Games/Chess/Engine.h

@@ -20,7 +20,7 @@ public:
     Engine(const Engine&) = delete;
     Engine(const Engine&) = delete;
     Engine& operator=(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>
     template<typename Callback>
     void get_best_move(const Chess::Board& board, int time_limit, Callback&& callback)
     void get_best_move(const Chess::Board& board, int time_limit, Callback&& callback)

+ 1 - 1
Userland/Libraries/LibChess/UCIEndpoint.h

@@ -36,7 +36,7 @@ public:
 
 
     void send_command(const Command&);
     void send_command(const Command&);
 
 
-    virtual void event(Core::Event&);
+    virtual void event(Core::Event&) override;
 
 
     Core::IODevice& in() { return *m_in; }
     Core::IODevice& in() { return *m_in; }
     Core::IODevice& out() { return *m_out; }
     Core::IODevice& out() { return *m_out; }

+ 1 - 1
Userland/Libraries/LibGUI/Calendar.h

@@ -80,7 +80,7 @@ private:
     virtual void mousemove_event(GUI::MouseEvent&) override;
     virtual void mousemove_event(GUI::MouseEvent&) override;
     virtual void mousedown_event(MouseEvent&) override;
     virtual void mousedown_event(MouseEvent&) override;
     virtual void mouseup_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;
     virtual void leave_event(Core::Event&) override;
 
 
     struct Day {
     struct Day {

+ 3 - 3
Userland/Libraries/LibGUI/ColorPicker.cpp

@@ -156,8 +156,8 @@ public:
     Function<void(Color)> on_color_changed;
     Function<void(Color)> on_color_changed;
 
 
 private:
 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();
         auto new_col = WindowServerConnection::the().get_color_under_cursor();
         if (new_col == m_col)
         if (new_col == m_col)
@@ -167,7 +167,7 @@ private:
             on_color_changed(m_col);
             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) {
         if (event.key() == KeyCode::Key_Escape) {
             event.accept();
             event.accept();

+ 3 - 3
Userland/Services/ChessEngine/ChessEngine.h

@@ -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:
 private:
     Chess::Board m_board;
     Chess::Board m_board;