Removed redundant if statements where possible
This commit is contained in:
@@ -73,11 +73,7 @@ namespace OpenVulkano
|
||||
|
||||
size_t SystemInfo::GetSystemRam()
|
||||
{
|
||||
static size_t ram;
|
||||
if (ram == 0)
|
||||
{
|
||||
ram = ReadMemInfo("MemTotal");
|
||||
}
|
||||
static const size_t ram = ReadMemInfo("MemTotal");
|
||||
return ram;
|
||||
}
|
||||
|
||||
@@ -314,11 +310,7 @@ namespace OpenVulkano
|
||||
|
||||
size_t SystemInfo::GetCpuThreadCount()
|
||||
{
|
||||
static size_t threadCount;
|
||||
if (threadCount == 0)
|
||||
{
|
||||
threadCount = std::thread::hardware_concurrency();
|
||||
}
|
||||
static const size_t threadCount = std::thread::hardware_concurrency();
|
||||
return threadCount;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user