From 792f0f7f2e107fe6edee175ddf0b08135a355e7c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 26 Mar 2012 14:21:49 +0000 Subject: BufferManager no longer owns buffers, only register them --- src/buffer_manager.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/buffer_manager.hh') diff --git a/src/buffer_manager.hh b/src/buffer_manager.hh index ee3473cd..7109dc11 100644 --- a/src/buffer_manager.hh +++ b/src/buffer_manager.hh @@ -1,20 +1,20 @@ #ifndef buffer_manager_hh_INCLUDED #define buffer_manager_hh_INCLUDED -#include "buffer.hh" #include "completion.hh" #include "utils.hh" #include -#include namespace Kakoune { +class Buffer; + class BufferManager : public Singleton { public: - typedef std::unordered_map> BufferMap; + typedef std::unordered_map BufferMap; struct iterator : public BufferMap::const_iterator { @@ -23,11 +23,11 @@ public: iterator() {} iterator(const parent_type& other) : parent_type(other) {} Buffer& operator*() const { return *(parent_type::operator*().second); } - Buffer* operator->() const { return parent_type::operator*().second.get(); } + Buffer* operator->() const { return parent_type::operator*().second; } }; void register_buffer(Buffer* buffer); - void delete_buffer(Buffer* buffer); + void unregister_buffer(Buffer* buffer); iterator begin() const { return iterator(m_buffers.begin()); } iterator end() const { return iterator(m_buffers.end()); } -- cgit v1.2.3