mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07: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:
parent
ddf6dd5fa2
commit
8da43a4054
11 changed files with 45 additions and 45 deletions
|
@ -339,8 +339,8 @@ void WebApplication::doProcessRequest()
|
|||
}
|
||||
|
||||
// Filter HTTP methods
|
||||
const auto allowedMethodIter = m_allowedMethod.find({scope, action});
|
||||
if (allowedMethodIter == m_allowedMethod.end())
|
||||
const auto allowedMethodIter = m_allowedMethod.constFind({scope, action});
|
||||
if (allowedMethodIter == m_allowedMethod.cend())
|
||||
{
|
||||
// by default allow both GET, POST methods
|
||||
if ((m_request.method != Http::METHOD_GET) && (m_request.method != Http::METHOD_POST))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue