diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp index 9fe506ab06..4ea404b738 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -1057,7 +1057,6 @@ DialogsInfo ParseDialogsInfo(const MTPmessages_Dialogs &data) { info.peerId = ParsePeerId(fields.vpeer); const auto peerIt = peers.find(info.peerId); if (peerIt != end(peers)) { - using Type = DialogInfo::Type; const auto &peer = peerIt->second; info.type = peer.user() ? DialogTypeFromUser(*peer.user()) diff --git a/Telegram/SourceFiles/export/output/export_output_json.cpp b/Telegram/SourceFiles/export/output/export_output_json.cpp index 0cd0dbd220..d41d3095c8 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.cpp +++ b/Telegram/SourceFiles/export/output/export_output_json.cpp @@ -47,10 +47,12 @@ QByteArray SerializeString(const QByteArray &value) { } else { result.append('0' + left); } - } else if (ch == 0xE2 && (p + 2 < end) && *(p + 1) == 0x80) { - if (*(p + 2) == 0xA8) { // Line separator. + } else if (ch == char(0xE2) + && (p + 2 < end) + && *(p + 1) == char(0x80)) { + if (*(p + 2) == char(0xA8)) { // Line separator. result.append("\\u2028", 6); - } else if (*(p + 2) == 0xA9) { // Paragraph separator. + } else if (*(p + 2) == char(0xA9)) { // Paragraph separator. result.append("\\u2029", 6); } else { result.append(ch); diff --git a/Telegram/SourceFiles/export/output/export_output_json.h b/Telegram/SourceFiles/export/output/export_output_json.h index 579dab48f7..62c024e0cc 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.h +++ b/Telegram/SourceFiles/export/output/export_output_json.h @@ -18,8 +18,8 @@ namespace details { struct JsonContext { using Type = bool; - static const auto kObject = Type(true); - static const auto kArray = Type(false); + static constexpr auto kObject = Type(true); + static constexpr auto kArray = Type(false); // Always fun to use std::vector. std::vector nesting; diff --git a/Telegram/SourceFiles/export/output/export_output_result.h b/Telegram/SourceFiles/export/output/export_output_result.h index a715e6481d..8be678d01d 100644 --- a/Telegram/SourceFiles/export/output/export_output_result.h +++ b/Telegram/SourceFiles/export/output/export_output_result.h @@ -19,7 +19,7 @@ struct Result { FatalError }; - Result(Type type, QString path) : type(type), path(path) { + Result(Type type, QString path) : path(path), type(type) { } static Result Success() {