From 7f7649f13daba4c2b03e4b2689e8ed506059950b Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Sat, 8 Nov 2025 19:38:30 +0000 Subject: [PATCH] Replace some NULLs with nullptr Signed-off-by: TheKodeToad --- launcher/SysInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/SysInfo.cpp b/launcher/SysInfo.cpp index c0e69c722..a0891b538 100644 --- a/launcher/SysInfo.cpp +++ b/launcher/SysInfo.cpp @@ -61,7 +61,7 @@ bool rosettaDetect() { int ret = 0; size_t size = sizeof(ret); - if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1) { + if (sysctlbyname("sysctl.proc_translated", &ret, &size, nullptr, 0) == -1) { return false; } return ret == 1; @@ -118,8 +118,8 @@ uint64_t getSystemRamMiB() #elif defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) char buff[512]; FILE* fp = popen("sysctl hw.physmem", "r"); - if (fp != NULL) { - if (fgets(buff, 512, fp) != NULL) { + if (fp != nullptr) { + if (fgets(buff, 512, fp) != nullptr) { std::string str(buff); uint64_t mem = std::stoull(str.substr(12, std::string::npos)); @@ -131,7 +131,7 @@ uint64_t getSystemRamMiB() uint64_t memsize; size_t memsizesize = sizeof memsize; - if (!sysctlbyname("hw.memsize", &memsize, &memsizesize, NULL, 0)) { + if (!sysctlbyname("hw.memsize", &memsize, &memsizesize, nullptr, 0)) { // transforming bytes -> mib return memsize / 1024 / 1024; }