Remove virtual destructor from OptionManagerWatcher

We should never destruct anything through an OptionManagerWatcher
pointer, so having all those destructor virtual makes no sense.
This commit is contained in:
Maxime Coste 2017-05-22 10:31:56 +01:00
parent bdcfe30834
commit bc11e52960
6 changed files with 6 additions and 8 deletions

View File

@ -121,7 +121,7 @@ public:
timespec fs_timestamp = InvalidTime); timespec fs_timestamp = InvalidTime);
Buffer(const Buffer&) = delete; Buffer(const Buffer&) = delete;
Buffer& operator= (const Buffer&) = delete; Buffer& operator= (const Buffer&) = delete;
~Buffer() override; ~Buffer();
Flags flags() const { return m_flags; } Flags flags() const { return m_flags; }
Flags& flags() { return m_flags; } Flags& flags() { return m_flags; }

View File

@ -30,7 +30,7 @@ public:
SelectionList selections, SelectionList selections,
EnvVarMap env_vars, EnvVarMap env_vars,
String name); String name);
~Client() override; ~Client();
Client(Client&&) = delete; Client(Client&&) = delete;

View File

@ -87,7 +87,7 @@ public:
InsertCompleter(Context& context); InsertCompleter(Context& context);
InsertCompleter(const InsertCompleter&) = delete; InsertCompleter(const InsertCompleter&) = delete;
InsertCompleter& operator=(const InsertCompleter&) = delete; InsertCompleter& operator=(const InsertCompleter&) = delete;
~InsertCompleter() override; ~InsertCompleter();
void select(int offset, Vector<Key>& keystrokes); void select(int offset, Vector<Key>& keystrokes);
void update(); void update();

View File

@ -70,8 +70,6 @@ protected:
class OptionManagerWatcher class OptionManagerWatcher
{ {
public: public:
virtual ~OptionManagerWatcher() = default;
virtual void on_option_changed(const Option& option) = 0; virtual void on_option_changed(const Option& option) = 0;
}; };
@ -79,7 +77,7 @@ class OptionManager : private OptionManagerWatcher
{ {
public: public:
OptionManager(OptionManager& parent); OptionManager(OptionManager& parent);
~OptionManager() override; ~OptionManager();
Option& operator[] (StringView name); Option& operator[] (StringView name);
const Option& operator[] (StringView name) const; const Option& operator[] (StringView name) const;

View File

@ -16,7 +16,7 @@ class Window : public SafeCountable, public OptionManagerWatcher, public Scope
{ {
public: public:
Window(Buffer& buffer); Window(Buffer& buffer);
~Window() override; ~Window();
const DisplayCoord& position() const { return m_position; } const DisplayCoord& position() const { return m_position; }
void set_position(DisplayCoord position); void set_position(DisplayCoord position);

View File

@ -17,7 +17,7 @@ class WordDB : public OptionManagerWatcher
{ {
public: public:
WordDB(const Buffer& buffer); WordDB(const Buffer& buffer);
~WordDB() override; ~WordDB();
WordDB(const WordDB&) = delete; WordDB(const WordDB&) = delete;
WordDB(WordDB&&) noexcept; WordDB(WordDB&&) noexcept;