From 3eb3969a015960d558dbbb26a5d07d5497af7e32 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Fri, 23 May 2025 13:48:39 -0400 Subject: [PATCH] chore: use final for overrides and remove virtual for non base classes --- src/lib/arch/unix/ArchMultithreadPosix.h | 4 ++-- src/lib/client/Client.h | 2 +- src/lib/deskflow/Clipboard.h | 4 ++-- src/lib/deskflow/Screen.h | 8 ++++---- src/lib/platform/EiScreen.h | 2 +- src/lib/platform/XWindowsKeyState.h | 2 +- src/lib/platform/XWindowsScreen.h | 2 +- src/lib/server/InputFilter.h | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/arch/unix/ArchMultithreadPosix.h b/src/lib/arch/unix/ArchMultithreadPosix.h index 98cf289ee..96af9f2d1 100644 --- a/src/lib/arch/unix/ArchMultithreadPosix.h +++ b/src/lib/arch/unix/ArchMultithreadPosix.h @@ -63,10 +63,10 @@ public: void closeMutex(ArchMutex) override; void lockMutex(ArchMutex) override; void unlockMutex(ArchMutex) override; - ArchThread newThread(ThreadFunc, void *) override; + ArchThread newThread(ThreadFunc, void *) final; ArchThread newCurrentThread() override; ArchThread copyThread(ArchThread) override; - void closeThread(ArchThread) override; + void closeThread(ArchThread) final; void cancelThread(ArchThread) override; void setPriorityOfThread(ArchThread, int n) override; void testCancelThread() override; diff --git a/src/lib/client/Client.h b/src/lib/client/Client.h index 0fc6ad077..e0c1cb11f 100644 --- a/src/lib/client/Client.h +++ b/src/lib/client/Client.h @@ -130,7 +130,7 @@ public: //@} // IScreen overrides - void *getEventTarget() const override; + void *getEventTarget() const final; bool getClipboard(ClipboardID id, IClipboard *) const override; void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override; void getCursorPos(int32_t &x, int32_t &y) const override; diff --git a/src/lib/deskflow/Clipboard.h b/src/lib/deskflow/Clipboard.h index f200d83eb..8a8b49402 100644 --- a/src/lib/deskflow/Clipboard.h +++ b/src/lib/deskflow/Clipboard.h @@ -43,9 +43,9 @@ public: //@} // IClipboard overrides - bool empty() override; + bool empty() final; void add(EFormat, const std::string &data) override; - bool open(Time) const override; + bool open(Time) const final; void close() const override; Time getTime() const override; bool has(EFormat) const override; diff --git a/src/lib/deskflow/Screen.h b/src/lib/deskflow/Screen.h index 75d68eeb2..79c586089 100644 --- a/src/lib/deskflow/Screen.h +++ b/src/lib/deskflow/Screen.h @@ -46,14 +46,14 @@ public: For a secondary screen it also means disabling the screen saver if synchronizing it and preparing to synthesize events. */ - virtual void enable(); + void enable(); //! Deactivate screen /*! Undoes the operations in activate() and events are no longer reported. It also releases keys that are logically pressed. */ - virtual void disable(); + void disable(); //! Enter screen /*! @@ -168,14 +168,14 @@ public: /*! Resets all options to their default values. */ - virtual void resetOptions(); + void resetOptions(); //! Notify of options changes /*! Set options to given values. Ignores unknown options and doesn't modify options that aren't given in \c options. */ - virtual void setOptions(const OptionsList &options); + void setOptions(const OptionsList &options); //! Set clipboard sequence number /*! diff --git a/src/lib/platform/EiScreen.h b/src/lib/platform/EiScreen.h index 9e0039f0a..be7410533 100644 --- a/src/lib/platform/EiScreen.h +++ b/src/lib/platform/EiScreen.h @@ -35,7 +35,7 @@ public: ~EiScreen() override; // IScreen overrides - void *getEventTarget() const override; + void *getEventTarget() const final; bool getClipboard(ClipboardID id, IClipboard *) const override; void getShape(std::int32_t &x, std::int32_t &y, std::int32_t &width, std::int32_t &height) const override; void getCursorPos(std::int32_t &x, std::int32_t &y) const override; diff --git a/src/lib/platform/XWindowsKeyState.h b/src/lib/platform/XWindowsKeyState.h index 59a6c376f..3f79f055e 100644 --- a/src/lib/platform/XWindowsKeyState.h +++ b/src/lib/platform/XWindowsKeyState.h @@ -96,7 +96,7 @@ public: // IKeyState overrides bool fakeCtrlAltDel() override; KeyModifierMask pollActiveModifiers() const override; - int32_t pollActiveGroup() const override; + int32_t pollActiveGroup() const final; void pollPressedKeys(KeyButtonSet &pressedKeys) const override; protected: diff --git a/src/lib/platform/XWindowsScreen.h b/src/lib/platform/XWindowsScreen.h index 9dd537057..1133a448b 100644 --- a/src/lib/platform/XWindowsScreen.h +++ b/src/lib/platform/XWindowsScreen.h @@ -42,7 +42,7 @@ public: //@} // IScreen overrides - void *getEventTarget() const override; + void *getEventTarget() const final; bool getClipboard(ClipboardID id, IClipboard *) const override; void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override; void getCursorPos(int32_t &x, int32_t &y) const override; diff --git a/src/lib/server/InputFilter.h b/src/lib/server/InputFilter.h index d1ca6520f..7e9836628 100644 --- a/src/lib/server/InputFilter.h +++ b/src/lib/server/InputFilter.h @@ -357,7 +357,7 @@ public: explicit InputFilter(IEventQueue *events); InputFilter(const InputFilter &); - virtual ~InputFilter(); + ~InputFilter(); InputFilter &operator=(const InputFilter &); @@ -372,7 +372,7 @@ public: // enable event filtering using the given primary client. disable // if client is nullptr. - virtual void setPrimaryClient(PrimaryClient *client); + void setPrimaryClient(PrimaryClient *client); // convert rules to a string std::string format(const std::string_view &linePrefix) const;