mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
use contains instead of regex
This commit is contained in:
parent
9f455b99b2
commit
c71a78f189
1 changed files with 1 additions and 2 deletions
|
|
@ -60,8 +60,7 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
size_t len = sizeof(arch);
|
size_t len = sizeof(arch);
|
||||||
if (sysctlbyname("machdep.cpu.brand_string", arch, &len, nullptr, 0) == 0) {
|
if (sysctlbyname("machdep.cpu.brand_string", arch, &len, nullptr, 0) == 0) {
|
||||||
// Intel mac is only supported on macOS 13 versions
|
// Intel mac is only supported on macOS 13 versions
|
||||||
static QRegularExpression intel_regex("Intel");
|
if (QString::fromUtf8(arch).contains("Intel")) {
|
||||||
if (intel_regex.match(QString::fromUtf8(arch)).hasMatch()) {
|
|
||||||
return 13;
|
return 13;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue