summaryrefslogtreecommitdiff
path: root/src/buffer_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-09-23 14:26:53 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-09-23 14:26:53 +0000
commit26537d7028afe67bcf78c24374f948f4f1fddc6b (patch)
tree69d513c8810a2976aad20fdc9bd40da4687cbc44 /src/buffer_manager.cc
parent52ad372adbef14f0acec0e69edc3678284abafdd (diff)
Utils: Singleton template and migration of the BufferManager
Singletons are not autocreating, the application needs to create exactly one instance (I want to avoid implicit initialization order hell)
Diffstat (limited to 'src/buffer_manager.cc')
-rw-r--r--src/buffer_manager.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc
index eb75c3a7..27187080 100644
--- a/src/buffer_manager.cc
+++ b/src/buffer_manager.cc
@@ -10,26 +10,6 @@ namespace Kakoune
struct name_not_unique : logic_error {};
-BufferManager* BufferManager::ms_instance = nullptr;
-
-BufferManager& BufferManager::instance()
-{
- if (not ms_instance)
- ms_instance = new BufferManager();
-
- return *ms_instance;
-}
-
-void BufferManager::delete_instance()
-{
- delete ms_instance;
- ms_instance = nullptr;
-}
-
-BufferManager::BufferManager()
-{
-}
-
void BufferManager::register_buffer(Buffer* buffer)
{
assert(buffer);