summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-09-04 00:17:41 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-09-04 00:17:41 +0200
commit11d5ae27434a5e36f6500b60a785b86261da6554 (patch)
tree9edce411a20f72cf6b6f71a829ed62096f9a3597 /src
parent0e6ced91764764d26b9f7a8550782c1940d07ac9 (diff)
add override markers
Diffstat (limited to 'src')
-rw-r--r--src/assert.hh2
-rw-r--r--src/exception.hh2
-rw-r--r--src/register_manager.cc8
-rw-r--r--src/selection.hh6
-rw-r--r--src/window.hh4
5 files changed, 12 insertions, 10 deletions
diff --git a/src/assert.hh b/src/assert.hh
index ceee28f2..975ddca1 100644
--- a/src/assert.hh
+++ b/src/assert.hh
@@ -9,7 +9,7 @@ namespace Kakoune
struct assert_failed : logic_error
{
assert_failed(const String& message);
- String description() const;
+ String description() const override;
private:
String m_message;
diff --git a/src/exception.hh b/src/exception.hh
index 5aab02f6..0b68d39e 100644
--- a/src/exception.hh
+++ b/src/exception.hh
@@ -17,7 +17,7 @@ struct runtime_error : exception
runtime_error(const String& description)
: m_description(description) {}
- String description() const { return m_description; }
+ String description() const override { return m_description; }
private:
String m_description;
diff --git a/src/register_manager.cc b/src/register_manager.cc
index e77510a1..11bae66a 100644
--- a/src/register_manager.cc
+++ b/src/register_manager.cc
@@ -11,13 +11,13 @@ namespace Kakoune
class StaticRegister : public Register
{
public:
- Register& operator=(const memoryview<String>& values)
+ Register& operator=(const memoryview<String>& values) override
{
m_content = std::vector<String>(values.begin(), values.end());
return *this;
}
- memoryview<String> values(const Context&)
+ memoryview<String> values(const Context&) override
{
if (m_content.empty())
return memoryview<String>(ms_empty);
@@ -40,12 +40,12 @@ public:
DynamicRegister(RegisterRetriever function)
: m_function(std::move(function)) {}
- Register& operator=(const memoryview<String>& values)
+ Register& operator=(const memoryview<String>& values) override
{
throw runtime_error("this register is not assignable");
}
- memoryview<String> values(const Context& context)
+ memoryview<String> values(const Context& context) override
{
m_content = m_function(context);
return StaticRegister::values(context);
diff --git a/src/selection.hh b/src/selection.hh
index 7081e427..18e1dbab 100644
--- a/src/selection.hh
+++ b/src/selection.hh
@@ -31,8 +31,10 @@ struct Selection : public BufferChangeListener
void merge_with(const Selection& selection);
void avoid_eol();
- void on_insert(const BufferIterator& begin, const BufferIterator& end);
- void on_erase(const BufferIterator& begin, const BufferIterator& end);
+ void on_insert(const BufferIterator& begin,
+ const BufferIterator& end) override;
+ void on_erase(const BufferIterator& begin,
+ const BufferIterator& end) override;
private:
BufferIterator m_first;
diff --git a/src/window.hh b/src/window.hh
index 119cf962..fd0598e4 100644
--- a/src/window.hh
+++ b/src/window.hh
@@ -49,8 +49,8 @@ private:
Window(Buffer& buffer);
Window(const Window&) = delete;
- void on_incremental_insertion_end();
- void on_option_changed(const String& name, const Option& option);
+ void on_incremental_insertion_end() override;
+ void on_option_changed(const String& name, const Option& option) override;
void scroll_to_keep_cursor_visible_ifn();