From e5c46d7c45d35b79d804c34a4ece271d424f66ed Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 10 Aug 2012 14:21:01 +0200 Subject: [PATCH] Window,Buffer: add const overload for {option,hook}_manager --- src/buffer.hh | 6 ++++-- src/window.hh | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/buffer.hh b/src/buffer.hh index cc09831b..5f171e75 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -178,8 +178,10 @@ public: const String& line_content(size_t l) const { return m_lines[l].content; } - OptionManager& option_manager() { return m_option_manager; } - HookManager& hook_manager() { return m_hook_manager; } + OptionManager& option_manager() { return m_option_manager; } + const OptionManager& option_manager() const { return m_option_manager; } + HookManager& hook_manager() { return m_hook_manager; } + const HookManager& hook_manager() const { return m_hook_manager; } private: friend class BufferIterator; diff --git a/src/window.hh b/src/window.hh index d36755fe..455830e5 100644 --- a/src/window.hh +++ b/src/window.hh @@ -36,8 +36,11 @@ public: HighlighterGroup& highlighters() { return m_highlighters; } - HookManager& hook_manager() { return m_hook_manager; } - OptionManager& option_manager() { return m_option_manager; } + OptionManager& option_manager() { return m_option_manager; } + const OptionManager& option_manager() const { return m_option_manager; } + HookManager& hook_manager() { return m_hook_manager; } + const HookManager& hook_manager() const { return m_hook_manager; } + private: friend class Buffer;