Fix unnecessary buffer line copy in BufferManager::create_buffer
This commit is contained in:
parent
068af3d9d4
commit
b8a151ab46
|
@ -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, lines, bom, eolformat, fs_status));
|
||||
m_buffers.push_back(std::make_unique<Buffer>(std::move(name), flags, std::move(lines), bom, eolformat, fs_status));
|
||||
auto* buffer = m_buffers.back().get();
|
||||
buffer->on_registered();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user