Date: Tue, 17 Jul 2018 20:29:49 +0200 --- Telegram/SourceFiles/export/data/export_data_types.cpp | 9 ++++++--- Telegram/SourceFiles/export/export_api_wrap.cpp | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp index f835dc2f9..e811c27e8 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -221,7 +221,8 @@ Image ParseMaxImage( result.width = data.vw.v; result.height = data.vh.v; result.file.location = ParseLocation(data.vlocation); - if constexpr (MTPDphotoCachedSize::Is()) { + constexpr bool condition = MTPDphotoCachedSize::Is(); + if constexpr (condition) { result.file.content = data.vbytes.v; result.file.size = result.file.content.size(); } else { @@ -409,7 +410,8 @@ Document ParseDocument( result.width = data.vw.v; result.height = data.vh.v; result.file.location = ParseLocation(data.vlocation); - if constexpr (MTPDphotoCachedSize::Is()) { + constexpr bool condition = MTPDphotoCachedSize::Is(); + if constexpr (condition) { result.file.content = data.vbytes.v; result.file.size = result.file.content.size(); } else { @@ -1017,7 +1019,8 @@ Message ParseMessage( auto result = Message(); data.match([&](const auto &data) { result.id = data.vid.v; - if constexpr (!MTPDmessageEmpty::Is()) { + constexpr bool condition = !MTPDmessageEmpty::Is(); + if constexpr (condition) { result.toId = ParsePeerId(data.vto_id); const auto peerId = (!data.is_out() && data.has_from_id() diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp index b618937f6..bb98647dd 100644 --- a/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp @@ -709,7 +709,8 @@ void ApiWrap::handleUserpicsSlice(const MTPphotos_Photos &result) { Expects(_userpicsProcess != nullptr); result.match([&](const auto &data) { - if constexpr (MTPDphotos_photos::Is()) { + constexpr bool condition = MTPDphotos_photos::Is(); + if constexpr (condition) { _userpicsProcess->lastSlice = true; } loadUserpicsFiles(Data::ParseUserpicsSlice( @@ -1141,7 +1142,8 @@ void ApiWrap::requestMessagesSlice() { result.match([&](const MTPDmessages_messagesNotModified &data) { error("Unexpected messagesNotModified received."); }, [&](const auto &data) { - if constexpr (MTPDmessages_messages::Is()) { + constexpr bool condition = MTPDmessages_messages::Is(); + if constexpr (condition) { _chatProcess->lastSlice = true; } loadMessagesFiles(Data::ParseMessagesSlice( -- 2.16.3