2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Try to use const-ref better in rpl.

This commit is contained in:
John Preston
2017-09-14 22:27:41 +03:00
parent c302219f9e
commit fbcd5e2f1e
17 changed files with 171 additions and 61 deletions

View File

@@ -171,8 +171,8 @@ FlatLabel::FlatLabel(
, _st(st)
, _contextCopyText(lang(lng_context_copy_text)) {
std::move(text)
| rpl::on_next([this](QString &&value) {
setText(std::move(value));
| rpl::on_next([this](const QString &value) {
setText(value);
})
| rpl::start(lifetime());
}
@@ -186,8 +186,8 @@ FlatLabel::FlatLabel(
, _st(st)
, _contextCopyText(lang(lng_context_copy_text)) {
std::move(text)
| rpl::on_next([this](TextWithEntities &&value) {
setMarkedText(std::move(value));
| rpl::on_next([this](const TextWithEntities &value) {
setMarkedText(value);
})
| rpl::start(lifetime());
}