diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-24 18:20:04 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-24 22:29:29 +0100 |
commit | e617f0151df9a5edbefeb2c36d306a2989a278af (patch) | |
tree | c3c80fcab98a3bf3f0a017350f3f17956961fa98 /lib/user.cpp | |
parent | 3bfe40e40183821557845456349e1079af7b4e25 (diff) | |
download | libquotient-e617f0151df9a5edbefeb2c36d306a2989a278af.tar.gz libquotient-e617f0151df9a5edbefeb2c36d306a2989a278af.zip |
Fix clang-tidy/clazy warnings
(cherry picked from commit 0a2acd750a4155969092be674ed3dd9a71b2354f)
Diffstat (limited to 'lib/user.cpp')
-rw-r--r-- | lib/user.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/user.cpp b/lib/user.cpp index 45a9c121..c399ce88 100644 --- a/lib/user.cpp +++ b/lib/user.cpp @@ -78,7 +78,7 @@ QString User::id() const { return d->id; } bool User::isGuest() const { Q_ASSERT(!d->id.isEmpty() && d->id.startsWith('@')); - auto it = std::find_if_not(d->id.begin() + 1, d->id.end(), + auto it = std::find_if_not(d->id.cbegin() + 1, d->id.cend(), [](QChar c) { return c.isDigit(); }); Q_ASSERT(it != d->id.end()); return *it == ':'; @@ -138,7 +138,7 @@ inline bool User::doSetAvatar(SourceT&& source) connect(j, &BaseJob::success, this, [this, newUrl = QUrl(contentUri)] { if (newUrl == d->defaultAvatar.url()) { - d->defaultAvatar.updateUrl(move(newUrl)); + d->defaultAvatar.updateUrl(newUrl); emit defaultAvatarChanged(); } else qCWarning(MAIN) << "User" << id() |