From 694e8cd19fd7e85f03531ae910f04c9fbe115f3e Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 17 May 2018 11:15:52 +0300 Subject: [PATCH] Remove MSVC compiler bug workaround. It works fine in Visual Studio 2017 15.7.1. --- .../info/profile/info_profile_cover.cpp | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index 3fb78a8fa..798a5b3e0 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -248,21 +248,11 @@ Cover::Cover( void Cover::setupChildGeometry() { using namespace rpl::mappers; - // - // Visual Studio 2017 15.5.1 internal compiler error here. - // See https://developercommunity.visualstudio.com/content/problem/165155/ice-regression-in-1551-after-successfull-build-in.html - // - //rpl::combine( - // toggleShownValue(), - // widthValue(), - // _2 - //) | rpl::map([](bool shown, int width) { rpl::combine( toggleShownValue(), - widthValue() - ) | rpl::map([](bool shown, int width) { - return width; - }) | rpl::start_with_next([this](int newWidth) { + widthValue(), + _2 + ) | rpl::start_with_next([this](int newWidth) { _userpic->moveToLeft( st::infoProfilePhotoLeft, st::infoProfilePhotoTop, @@ -453,21 +443,12 @@ void SharedMediaCover::createLabel() { Lang::Viewer(lng_profile_shared_media) | ToUpperValue(), st::infoBlockHeaderLabel); label->setAttribute(Qt::WA_TransparentForMouseEvents); - // - // Visual Studio 2017 15.5.1 internal compiler error here. - // See https://developercommunity.visualstudio.com/content/problem/165155/ice-regression-in-1551-after-successfull-build-in.html - // - //rpl::combine( - // toggleShownValue(), - // widthValue(), - // _2 - //) | rpl::map([](bool shown, int width) { + rpl::combine( toggleShownValue(), - widthValue() - ) | rpl::map([](bool shown, int width) { - return width; - }) | rpl::start_with_next([this, weak = label.data()](int newWidth) { + widthValue(), + _2 + ) | rpl::start_with_next([this, weak = label.data()](int newWidth) { auto availableWidth = newWidth - st::infoBlockHeaderPosition.x() - st::infoSharedMediaButton.padding.right()