1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 08:51:46 +03:00

Use std:move for selection parameters

This commit is contained in:
Maxime Coste 2014-09-22 13:55:39 +01:00
parent 6bcc038329
commit 0ac65e1610

View File

@ -16,13 +16,13 @@ void Selection::merge_with(const Selection& range)
}
SelectionList::SelectionList(Buffer& buffer, Selection s, size_t timestamp)
: m_buffer(&buffer), m_selections({ s }), m_timestamp(timestamp)
: m_buffer(&buffer), m_selections({ std::move(s) }), m_timestamp(timestamp)
{
check_invariant();
}
SelectionList::SelectionList(Buffer& buffer, Selection s)
: SelectionList(buffer, s, buffer.timestamp())
: SelectionList(buffer, std::move(s), buffer.timestamp())
{}
SelectionList::SelectionList(Buffer& buffer, std::vector<Selection> s, size_t timestamp)