add override markers

This commit is contained in:
Maxime Coste 2012-09-04 00:17:41 +02:00
parent 0e6ced9176
commit 11d5ae2743
5 changed files with 12 additions and 10 deletions

View File

@ -9,7 +9,7 @@ namespace Kakoune
struct assert_failed : logic_error struct assert_failed : logic_error
{ {
assert_failed(const String& message); assert_failed(const String& message);
String description() const; String description() const override;
private: private:
String m_message; String m_message;

View File

@ -17,7 +17,7 @@ struct runtime_error : exception
runtime_error(const String& description) runtime_error(const String& description)
: m_description(description) {} : m_description(description) {}
String description() const { return m_description; } String description() const override { return m_description; }
private: private:
String m_description; String m_description;

View File

@ -11,13 +11,13 @@ namespace Kakoune
class StaticRegister : public Register class StaticRegister : public Register
{ {
public: public:
Register& operator=(const memoryview<String>& values) Register& operator=(const memoryview<String>& values) override
{ {
m_content = std::vector<String>(values.begin(), values.end()); m_content = std::vector<String>(values.begin(), values.end());
return *this; return *this;
} }
memoryview<String> values(const Context&) memoryview<String> values(const Context&) override
{ {
if (m_content.empty()) if (m_content.empty())
return memoryview<String>(ms_empty); return memoryview<String>(ms_empty);
@ -40,12 +40,12 @@ public:
DynamicRegister(RegisterRetriever function) DynamicRegister(RegisterRetriever function)
: m_function(std::move(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"); 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); m_content = m_function(context);
return StaticRegister::values(context); return StaticRegister::values(context);

View File

@ -31,8 +31,10 @@ struct Selection : public BufferChangeListener
void merge_with(const Selection& selection); void merge_with(const Selection& selection);
void avoid_eol(); void avoid_eol();
void on_insert(const BufferIterator& begin, const BufferIterator& end); void on_insert(const BufferIterator& begin,
void on_erase(const BufferIterator& begin, const BufferIterator& end); const BufferIterator& end) override;
void on_erase(const BufferIterator& begin,
const BufferIterator& end) override;
private: private:
BufferIterator m_first; BufferIterator m_first;

View File

@ -49,8 +49,8 @@ private:
Window(Buffer& buffer); Window(Buffer& buffer);
Window(const Window&) = delete; Window(const Window&) = delete;
void on_incremental_insertion_end(); void on_incremental_insertion_end() override;
void on_option_changed(const String& name, const Option& option); void on_option_changed(const String& name, const Option& option) override;
void scroll_to_keep_cursor_visible_ifn(); void scroll_to_keep_cursor_visible_ifn();