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
@@ -27,13 +27,13 @@ namespace Window {
PlayerWrapWidget::PlayerWrapWidget(QWidget *parent)
: Parent(parent, object_ptr<Media::Player::Widget>(parent)) {
sizeValue()
| rpl::on_next([this](QSize &&size) {
| rpl::on_next([this](const QSize &size) {
updateShadowGeometry(size);
})
| rpl::start(lifetime());
}
void PlayerWrapWidget::updateShadowGeometry(QSize size) {
void PlayerWrapWidget::updateShadowGeometry(const QSize &size) {
auto skip = Adaptive::OneColumn() ? 0 : st::lineWidth;
entity()->setShadowGeometryToLeft(
skip,