Use std:move for selection parameters
This commit is contained in:
parent
6bcc038329
commit
0ac65e1610
|
@ -16,13 +16,13 @@ void Selection::merge_with(const Selection& range)
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionList::SelectionList(Buffer& buffer, Selection s, size_t timestamp)
|
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();
|
check_invariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionList::SelectionList(Buffer& buffer, Selection s)
|
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)
|
SelectionList::SelectionList(Buffer& buffer, std::vector<Selection> s, size_t timestamp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user