refactor: drop 64-bit check

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2022-08-08 19:18:36 +02:00
parent 7bd8bd13fe
commit 7e280de361
5 changed files with 0 additions and 69 deletions

View File

@ -55,18 +55,6 @@ uint64_t Sys::getSystemRam()
}
}
bool Sys::isCPU64bit()
{
// not even going to pretend I'm going to support anything else
return true;
}
bool Sys::isSystem64bit()
{
// yep. maybe when we have 128bit CPUs on consumer devices.
return true;
}
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo result;

View File

@ -82,17 +82,6 @@ uint64_t Sys::getSystemRam()
return 0; // nothing found
}
bool Sys::isCPU64bit()
{
return isSystem64bit();
}
bool Sys::isSystem64bit()
{
// kernel build arch on linux
return QSysInfo::currentCpuArchitecture() == "x86_64";
}
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo systemd_info = read_os_release();

View File

@ -27,28 +27,6 @@ uint64_t Sys::getSystemRam()
return (uint64_t)status.ullTotalPhys;
}
bool Sys::isSystem64bit()
{
#if defined(_WIN64)
return true;
#elif defined(_WIN32)
BOOL f64 = false;
return IsWow64Process(GetCurrentProcess(), &f64) && f64;
#else
// it's some other kind of system...
return false;
#endif
}
bool Sys::isCPU64bit()
{
SYSTEM_INFO info;
ZeroMemory(&info, sizeof(SYSTEM_INFO));
GetNativeSystemInfo(&info);
auto arch = info.wProcessorArchitecture;
return arch == PROCESSOR_ARCHITECTURE_AMD64 || arch == PROCESSOR_ARCHITECTURE_IA64;
}
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo result;