diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-07-08 11:43:17 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-07-08 12:07:33 +1000 |
| commit | ce1d512a0c1922ab5f43f28e7bae573508c98601 (patch) | |
| tree | 7af8effd6b00c304cda1c87f657a0014fcdae2ae /src/buffer_manager.cc | |
| parent | fea08fc18d268ace4f843ec2b57cc33e36562098 (diff) | |
Replace std::unique_ptr with a custom implementation
<memory> is a costly header we can avoid by just implementing
UniquePtr ourselves, which is a pretty straightforward in modern
C++, this saves around 10% of the compilation time here.
Diffstat (limited to 'src/buffer_manager.cc')
| -rw-r--r-- | src/buffer_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 539f160b..8b1309a0 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -34,7 +34,7 @@ Buffer* BufferManager::create_buffer(String name, Buffer::Flags flags, BufferLin throw runtime_error{"buffer name is already in use"}; } - m_buffers.push_back(std::make_unique<Buffer>(std::move(name), flags, std::move(lines), bom, eolformat, fs_status)); + m_buffers.push_back(make_unique_ptr<Buffer>(std::move(name), flags, std::move(lines), bom, eolformat, fs_status)); auto* buffer = m_buffers.back().get(); buffer->on_registered(); |
