mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Initialize regex only once
This code path is commonly used so let it initialize only once.
This commit is contained in:
parent
03d3552ee0
commit
b3d2ba7d07
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ bool RequestParser::parseRequestLine(const QString &line)
|
|||
{
|
||||
// [rfc7230] 3.1.1. Request Line
|
||||
|
||||
const QRegularExpression re(u"^([A-Z]+)\\s+(\\S+)\\s+HTTP\\/(\\d\\.\\d)$"_s);
|
||||
static const QRegularExpression re(u"^([A-Z]+)\\s+(\\S+)\\s+HTTP\\/(\\d\\.\\d)$"_s);
|
||||
const QRegularExpressionMatch match = re.match(line);
|
||||
|
||||
if (!match.hasMatch())
|
||||
|
|
Loading…
Reference in a new issue