diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 30ab9b24e..88db017fe 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -294,8 +294,8 @@ History::History(const PeerId &peerId) : width(0), height(0) , sendRequestId(0) , textCachedFor(0) , lastItemTextCache(st::dlgRichMinWidth) -, _sortKeyInChatList(0) -, typingText(st::dlgRichMinWidth) { +, typingText(st::dlgRichMinWidth) +, _sortKeyInChatList(0) { if (peer->isChannel() || (peer->isUser() && peer->asUser()->botInfo)) { outboxReadBefore = INT_MAX; } diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index a59c092b9..14a24470b 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -77,11 +77,11 @@ namespace MTP { extern const uint32 cfg; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum extern const uint32 lgt; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum - inline const uint32 dld(int32 index) { // send(req, callbacks, MTP::dld(i) + dc) - for download + inline uint32 dld(int32 index) { // send(req, callbacks, MTP::dld(i) + dc) - for download t_assert(index >= 0 && index < MTPDownloadSessionsCount); return (0x10 + index) * _mtp_internal::dcShift; }; - inline const uint32 upl(int32 index) { // send(req, callbacks, MTP::upl[i] + dc) - for upload + inline uint32 upl(int32 index) { // send(req, callbacks, MTP::upl(i) + dc) - for upload t_assert(index >= 0 && index < MTPUploadSessionsCount); return (0x20 + index) * _mtp_internal::dcShift; }; diff --git a/Telegram/SourceFiles/shortcuts.cpp b/Telegram/SourceFiles/shortcuts.cpp index 14d64ffbf..dd395f880 100644 --- a/Telegram/SourceFiles/shortcuts.cpp +++ b/Telegram/SourceFiles/shortcuts.cpp @@ -339,10 +339,10 @@ namespace Shortcuts { if (error.error == QJsonParseError::NoError && doc.isArray()) { QJsonArray shortcuts(doc.array()); - if (!shortcuts.isEmpty() && shortcuts.constBegin()->isObject()) { - QJsonObject versionObject(shortcuts.constBegin()->toObject()); + if (!shortcuts.isEmpty() && (*shortcuts.constBegin()).isObject()) { + QJsonObject versionObject((*shortcuts.constBegin()).toObject()); QJsonObject::const_iterator version = versionObject.constFind(qsl("version")); - if (version != versionObject.constEnd() && version->isString() && version->toString() == QString::number(AppVersion)) { + if (version != versionObject.constEnd() && (*version).isString() && (*version).toString() == QString::number(AppVersion)) { defaultValid = true; } } @@ -396,18 +396,18 @@ namespace Shortcuts { QJsonArray shortcuts = doc.array(); int limit = ShortcutsCountLimit; for (QJsonArray::const_iterator i = shortcuts.constBegin(), e = shortcuts.constEnd(); i != e; ++i) { - if (!i->isObject()) { + if (!(*i).isObject()) { DataPtr->errors.push_back(qsl("Bad entry! Error: object expected")); } else { QKeySequence seq; - QJsonObject entry(i->toObject()); + QJsonObject entry((*i).toObject()); QJsonObject::const_iterator keys = entry.constFind(qsl("keys")), command = entry.constFind(qsl("command")); - if (keys == entry.constEnd() || command == entry.constEnd() || !keys->isString() || (!command->isString() && !command->isNull())) { + if (keys == entry.constEnd() || command == entry.constEnd() || !(*keys).isString() || (!(*command).isString() && !(*command).isNull())) { DataPtr->errors.push_back(qsl("Bad entry! {\"keys\": \"...\", \"command\": [ \"...\" | null ]} expected")); - } else if (command->isNull()) { - seq = _removeShortcut(keys->toString()); + } else if ((*command).isNull()) { + seq = _removeShortcut((*keys).toString()); } else { - seq = _setShortcut(keys->toString(), command->toString()); + seq = _setShortcut((*keys).toString(), (*command).toString()); } if (!--limit) { DataPtr->errors.push_back(qsl("Too many entries! Limit is %1").arg(ShortcutsCountLimit));