chore: make all the regexes static const
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
21c90527d2
commit
c5fd5e6ac1
37 changed files with 87 additions and 84 deletions
|
@ -82,8 +82,8 @@ auto Resource::name() const -> QString
|
|||
|
||||
static void removeThePrefix(QString& string)
|
||||
{
|
||||
QRegularExpression regex(QStringLiteral("^(?:the|teh) +"), QRegularExpression::CaseInsensitiveOption);
|
||||
string.remove(regex);
|
||||
static const QRegularExpression s_regex(QStringLiteral("^(?:the|teh) +"), QRegularExpression::CaseInsensitiveOption);
|
||||
string.remove(s_regex);
|
||||
string = string.trimmed();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue