gui/accountmanager: Make isAccountIdAvailable a bit clearer.
authorHarald Eilertsen <haraldei@anduin.net>
Sun, 27 Sep 2020 12:24:19 +0000 (14:24 +0200)
committerHarald Eilertsen <haraldei@anduin.net>
Tue, 29 Sep 2020 17:31:24 +0000 (19:31 +0200)
Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
src/gui/accountmanager.cpp

index 4b3a28efdf77ca58ebf0891e1e56adccd26a8fee..3656a49a0e04ca137bdff508e34cff80890d47ee 100644 (file)
@@ -372,10 +372,10 @@ void AccountManager::shutdown()
 
 bool AccountManager::isAccountIdAvailable(const QString &id) const
 {
-    auto acc = std::find_if(_accounts.cbegin(), _accounts.cend(), [&id](const auto &acc) {
+    const auto it = std::find_if(_accounts.cbegin(), _accounts.cend(), [id](const auto &acc) {
         return acc->account()->id() == id;
     });
-    return acc == _accounts.cend();
+    return it == _accounts.cend();
 }
 
 QString AccountManager::generateFreeAccountId() const