diff --git a/emoji_suggestions/emoji_suggestions.cpp b/emoji_suggestions/emoji_suggestions.cpp index 7fd9ed1..e924c19 100644 --- a/emoji_suggestions/emoji_suggestions.cpp +++ b/emoji_suggestions/emoji_suggestions.cpp @@ -147,7 +147,7 @@ private: public: UsedWordGuard(std::vector &map, int index); UsedWordGuard(const UsedWordGuard &other) = delete; - UsedWordGuard(UsedWordGuard &&other); + [[maybe_unused]] UsedWordGuard(UsedWordGuard &&other); UsedWordGuard &operator=(const UsedWordGuard &other) = delete; UsedWordGuard &operator=(UsedWordGuard &&other) = delete; explicit operator bool() const; diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index fac557a..bdc5a88 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -191,7 +191,7 @@ void StartFonts() { #ifndef DESKTOP_APP_USE_PACKAGED_FONTS if (!fontSettings.useSystemFont) { - bool areGood[FontTypesCount] = { false }; + [[maybe_unused]] bool areGood[FontTypesCount] = { false }; for (auto i = 0; i != FontTypesCount; ++i) { const auto file = FontTypeFiles[i]; const auto name = FontTypeNames[i]; diff --git a/ui/text/text.cpp b/ui/text/text.cpp index b221bee..9ed1c80 100644 --- a/ui/text/text.cpp +++ b/ui/text/text.cpp @@ -2765,20 +2765,14 @@ void String::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) { } int String::countMaxMonospaceWidth() const { - const NewlineBlock *lastNewline = nullptr; - auto result = QFixed(); auto paragraphWidth = QFixed(); - auto lastNewlineStart = 0; auto fullMonospace = true; QFixed _width = 0, last_rBearing = 0, last_rPadding = 0; for (auto &block : _blocks) { auto b = block.get(); auto _btype = b->type(); if (_btype == TextBlockTNewline) { - lastNewlineStart = b->from(); - lastNewline = &block.unsafe(); - last_rBearing = b->f_rbearing(); last_rPadding = b->f_rpadding(); diff --git a/ui/text/text_entity.cpp b/ui/text/text_entity.cpp index 467add2..b535f4e 100644 --- a/ui/text/text_entity.cpp +++ b/ui/text/text_entity.cpp @@ -1481,7 +1481,7 @@ bool CutPart(TextWithEntities &sending, TextWithEntities &left, int32 limit) { } int elen = 0; - if (auto e = Ui::Emoji::Find(ch, end, &elen)) { + if (Ui::Emoji::Find(ch, end, &elen)) { for (int i = 0; i < elen; ++i, ++ch, ++s) { if (ch->isHighSurrogate() && i + 1 < elen && (ch + 1)->isLowSurrogate()) { ++ch;