summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-05-08 22:07:43 +1000
committerMaxime Coste <mawww@kakoune.org>2018-05-09 23:01:40 +1000
commit327d8ad7594ab4da9b7c670f5b5f5a164403b0d2 (patch)
tree4b9d79c1c3bc9138a1c255d203cb7067c5a7dea6 /src
parente8c648b7b796219b170bea529a5257a38621f861 (diff)
Mark Client, Window, Buffer and OptionManager as final
Avoids warning about non virtual destructor calls on them, as they have a vtable due to OptionManagerWatcher.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.hh2
-rw-r--r--src/client.hh2
-rw-r--r--src/option_manager.hh2
-rw-r--r--src/window.hh2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index 6b98e7c8..202469bb 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -103,7 +103,7 @@ using BufferLines = Vector<StringDataPtr, MemoryDomain::BufferContent>;
// The Buffer class permits to read and mutate this file
// representation. It also manage modifications undo/redo and
// provides tools to deal with the line/column nature of text.
-class Buffer : public SafeCountable, public OptionManagerWatcher, public Scope
+class Buffer final : public SafeCountable, public Scope, private OptionManagerWatcher
{
public:
enum class Flags
diff --git a/src/client.hh b/src/client.hh
index 1eb1e5d3..9d3daccd 100644
--- a/src/client.hh
+++ b/src/client.hh
@@ -22,7 +22,7 @@ enum class EventMode;
enum class InfoStyle;
enum class MenuStyle;
-class Client : public SafeCountable, public OptionManagerWatcher
+class Client final : public SafeCountable, public OptionManagerWatcher
{
public:
using OnExitCallback = std::function<void (int status)>;
diff --git a/src/option_manager.hh b/src/option_manager.hh
index 84c1be98..a7dc8ed2 100644
--- a/src/option_manager.hh
+++ b/src/option_manager.hh
@@ -78,7 +78,7 @@ public:
virtual void on_option_changed(const Option& option) = 0;
};
-class OptionManager : private OptionManagerWatcher
+class OptionManager final : private OptionManagerWatcher
{
public:
OptionManager(OptionManager& parent);
diff --git a/src/window.hh b/src/window.hh
index 94989046..c7cee384 100644
--- a/src/window.hh
+++ b/src/window.hh
@@ -13,7 +13,7 @@ namespace Kakoune
{
// A Window is a view onto a Buffer
-class Window : public SafeCountable, public OptionManagerWatcher, public Scope
+class Window final : public SafeCountable, public Scope, private OptionManagerWatcher
{
public:
Window(Buffer& buffer);