Fix unneeded string copy

This commit is contained in:
Maxime Coste 2015-03-11 13:58:42 +00:00
parent 3c1a325b6f
commit 023c8afb73

View File

@ -166,7 +166,8 @@ void Buffer::reload(BufferLines lines, time_t fs_timestamp)
{ {
for (auto line = line_count()-1; line >= 0; --line) for (auto line = line_count()-1; line >= 0; --line)
m_current_undo_group.emplace_back( m_current_undo_group.emplace_back(
Modification::Erase, line, m_lines[line]); Modification::Erase, line,
SharedString{m_lines.get_storage(line)});
} }
if (lines.empty()) if (lines.empty())