diff --git a/src/controllers/filters/parser/FilterParser.cpp b/src/controllers/filters/parser/FilterParser.cpp index 6b74900c1..e198aaeb9 100644 --- a/src/controllers/filters/parser/FilterParser.cpp +++ b/src/controllers/filters/parser/FilterParser.cpp @@ -54,7 +54,7 @@ ContextMap buildContextMap(const MessagePtr &m, chatterino::Channel *channel) bool subscribed = false; int subLength = 0; - for (const QString &subBadge : {"subscriber", "founder"}) + for (const auto &subBadge : {"subscriber", "founder"}) { if (!badges.contains(subBadge)) { diff --git a/src/widgets/helper/ResizingTextEdit.cpp b/src/widgets/helper/ResizingTextEdit.cpp index 63444f5bf..2d967999e 100644 --- a/src/widgets/helper/ResizingTextEdit.cpp +++ b/src/widgets/helper/ResizingTextEdit.cpp @@ -286,11 +286,12 @@ void ResizingTextEdit::insertFromMimeData(const QMimeData *source) this->imagePasted.invoke(source); return; } - else if (source->hasUrls()) + + if (source->hasUrls()) { bool hasUploadable = false; auto mimeDb = QMimeDatabase(); - for (const QUrl url : source->urls()) + for (const QUrl &url : source->urls()) { QMimeType mime = mimeDb.mimeTypeForUrl(url); if (mime.name().startsWith("image")) diff --git a/src/widgets/settingspages/ModerationPage.cpp b/src/widgets/settingspages/ModerationPage.cpp index f21d9ce06..cb4b3e629 100644 --- a/src/widgets/settingspages/ModerationPage.cpp +++ b/src/widgets/settingspages/ModerationPage.cpp @@ -239,7 +239,7 @@ void ModerationPage::addModerationButtonSettings( // build one line for each customizable button auto i = 0; - for (const auto tButton : getSettings()->timeoutButtons.getValue()) + for (const auto &tButton : getSettings()->timeoutButtons.getValue()) { const auto buttonNumber = QString::number(i); auto timeout = timeoutLayout.emplace().withoutMargin();