Editor::multi_select: reserve some vector space in advance
This commit is contained in:
parent
161e32e137
commit
298926a16e
|
@ -301,6 +301,7 @@ void Editor::multi_select(const MultiSelector& selector)
|
||||||
for (auto& sel : m_selections)
|
for (auto& sel : m_selections)
|
||||||
{
|
{
|
||||||
SelectionList res = selector(sel);
|
SelectionList res = selector(sel);
|
||||||
|
new_selections.reserve(new_selections.size() + res.size());
|
||||||
for (auto& new_sel : res)
|
for (auto& new_sel : res)
|
||||||
{
|
{
|
||||||
// preserve captures when selectors captures nothing.
|
// preserve captures when selectors captures nothing.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user