diff options
Diffstat (limited to 'src/buffer_manager.hh')
| -rw-r--r-- | src/buffer_manager.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer_manager.hh b/src/buffer_manager.hh index beba6652..80198942 100644 --- a/src/buffer_manager.hh +++ b/src/buffer_manager.hh @@ -14,7 +14,7 @@ class Buffer; class BufferManager : public Singleton<BufferManager> { public: - typedef std::unordered_map<String, Buffer*> BufferMap; + typedef std::unordered_map<String, safe_ptr<Buffer>> BufferMap; struct iterator : public BufferMap::const_iterator { @@ -23,7 +23,7 @@ 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; } + Buffer* operator->() const { return parent_type::operator*().second.get(); } }; ~BufferManager(); |
