Convert copy to move (#717)

This commit converts 3 spots of copy construction into move
construction.

`return data` was not converted to a move because it should be easily
RVO'able.

Signed-off-by: Fred Miller <fghzxm@outlook.com>
This commit is contained in:
fghzxm 2019-05-15 06:05:07 +08:00 committed by Dustin L. Howett (MSFT)
parent fb72dca939
commit ad27906db7

View file

@ -1024,9 +1024,9 @@ const TextBuffer::TextAndColor TextBuffer::GetTextForClipboard(const bool lineSe
}
}
data.text.emplace_back(selectionText);
data.FgAttr.emplace_back(selectionFgAttr);
data.BkAttr.emplace_back(selectionBkAttr);
data.text.emplace_back(std::move(selectionText));
data.FgAttr.emplace_back(std::move(selectionFgAttr));
data.BkAttr.emplace_back(std::move(selectionBkAttr));
}
return data;