From 5fed4d21b1f1f7d6530ef63a79ee3420a691d7d3 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 3 Jun 2023 01:51:36 +0200 Subject: Fix a few more clazy warnings --- src/Cache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Cache.cpp') diff --git a/src/Cache.cpp b/src/Cache.cpp index 2d87304c..7671af02 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -4424,7 +4424,9 @@ Cache::displayName(const QString &room_id, const QString &user_id) static bool isDisplaynameSafe(const std::string &s) { - for (QChar c : QString::fromStdString(s)) { + const auto str = QString::fromStdString(s); + + for (QChar c : str) { if (c.isPrint() && !c.isSpace()) return false; } -- cgit 1.5.1