mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Use const accessor
This avoids an unnecessary check to the container internal atomic variable and prevents potential detachment. PR #22280.
This commit is contained in:
@@ -103,8 +103,8 @@ void AuthController::logoutAction() const
|
||||
|
||||
bool AuthController::isBanned() const
|
||||
{
|
||||
const auto failedLoginIter = m_clientFailedLogins.find(m_sessionManager->clientId());
|
||||
if (failedLoginIter == m_clientFailedLogins.end())
|
||||
const auto failedLoginIter = m_clientFailedLogins.constFind(m_sessionManager->clientId());
|
||||
if (failedLoginIter == m_clientFailedLogins.cend())
|
||||
return false;
|
||||
|
||||
bool isBanned = (failedLoginIter->banTimer.remainingTime() >= 0);
|
||||
|
||||
Reference in New Issue
Block a user