summaryrefslogtreecommitdiff
path: root/src/buffer_utils.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-02-10 12:56:32 +1100
committerMaxime Coste <mawww@kakoune.org>2023-02-10 12:56:32 +1100
commit3150e9b3cd8e61d9bc68245d67822614d4376cf4 (patch)
treeb1a6cebd7427639428192d454b83e70364a976a8 /src/buffer_utils.cc
parenteb0e9831330d3b1e1d3ddb2bc789000706e6e445 (diff)
Avoid extra indirection for storing FifoWatcher
By improving the Value interface we can avoid storing a unique_ptr to a FifoWatcher and directly store the FifoWatcher.
Diffstat (limited to 'src/buffer_utils.cc')
-rw-r--r--src/buffer_utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer_utils.cc b/src/buffer_utils.cc
index a48a9ce9..47f9a88b 100644
--- a/src/buffer_utils.cc
+++ b/src/buffer_utils.cc
@@ -264,7 +264,7 @@ Buffer* create_fifo_buffer(String name, int fd, Buffer::Flags flags, bool scroll
bool m_scroll;
};
- buffer->values()[fifo_watcher_id] = Value(std::make_unique<FifoWatcher>(fd, *buffer, scroll));
+ buffer->values()[fifo_watcher_id] = Value(Meta::Type<FifoWatcher>{}, fd, *buffer, scroll);
buffer->flags() = flags | Buffer::Flags::Fifo | Buffer::Flags::NoUndo;
buffer->run_hook_in_own_context(Hook::BufOpenFifo, buffer->name());