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
|
@ -69,7 +69,8 @@ PackInstallTask::PackInstallTask(UserInteractionSupport* support, QString packNa
|
|||
{
|
||||
m_support = support;
|
||||
m_pack_name = packName;
|
||||
m_pack_safe_name = packName.replace(QRegularExpression("[^A-Za-z0-9]"), "");
|
||||
static const QRegularExpression s_regex("[^A-Za-z0-9]");
|
||||
m_pack_safe_name = packName.replace(s_regex, "");
|
||||
m_version_name = version;
|
||||
m_install_mode = installMode;
|
||||
}
|
||||
|
@ -938,7 +939,8 @@ bool PackInstallTask::extractMods(const QMap<QString, VersionMod>& toExtract,
|
|||
QString folderToExtract = "";
|
||||
if (mod.type == ModType::Extract) {
|
||||
folderToExtract = mod.extractFolder;
|
||||
folderToExtract.remove(QRegularExpression("^/"));
|
||||
static const QRegularExpression s_regex("^/");
|
||||
folderToExtract.remove(s_regex);
|
||||
}
|
||||
|
||||
qDebug() << "Extracting " + mod.file + " to " + extractToDir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue