Remove useless Vector, use a ConstArrayView instead

This commit is contained in:
Maxime Coste 2017-06-26 14:40:01 +01:00
parent 268c214f56
commit 477f0700f0

View File

@ -198,7 +198,7 @@ select_to_first_non_blank(const Buffer& buffer, const Selection& selection)
Optional<Selection>
select_matching(const Buffer& buffer, const Selection& selection)
{
Vector<Codepoint> matching_pairs = { '(', ')', '{', '}', '[', ']', '<', '>' };
ConstArrayView<Codepoint> matching_pairs = { '(', ')', '{', '}', '[', ']', '<', '>' };
Utf8Iterator it{buffer.iterator_at(selection.cursor()), buffer};
auto match = matching_pairs.end();
while (not is_eol(*it))