mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
chore: make all the regexes static const
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -98,8 +98,8 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply& reply)
|
||||
auto cache_control_header = reply.rawHeader("Cache-Control");
|
||||
qCDebug(taskMetaCacheLogC) << "Parsing 'Cache-Control' header with" << cache_control_header;
|
||||
|
||||
QRegularExpression max_age_expr("max-age=([0-9]+)");
|
||||
qint64 max_age = max_age_expr.match(cache_control_header).captured(1).toLongLong();
|
||||
static const QRegularExpression s_maxAgeExpr("max-age=([0-9]+)");
|
||||
qint64 max_age = s_maxAgeExpr.match(cache_control_header).captured(1).toLongLong();
|
||||
m_entry->setMaximumAge(max_age);
|
||||
|
||||
} else if (reply.hasRawHeader("Expires")) {
|
||||
|
Reference in New Issue
Block a user