From b8a151ab46cc873a36f6c44e61842e5db3f523ca Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 28 Feb 2024 20:54:37 +1100 Subject: [PATCH] Fix unnecessary buffer line copy in BufferManager::create_buffer --- src/buffer_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 22ccf366..45a50c3c 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(std::move(name), flags, lines, bom, eolformat, fs_status)); + m_buffers.push_back(std::make_unique(std::move(name), flags, std::move(lines), bom, eolformat, fs_status)); auto* buffer = m_buffers.back().get(); buffer->on_registered();