Removed redundant if statements where possible
This commit is contained in:
@@ -426,7 +426,7 @@ namespace OpenVulkano
|
||||
|
||||
OsVersion SystemInfo::GetOsVersion()
|
||||
{
|
||||
static OsVersion osVersion;
|
||||
static OsVersion osVersion = {};
|
||||
if (osVersion.major == 0 && osVersion.minor == 0)
|
||||
{
|
||||
NTSTATUS(WINAPI * RtlGetVersion)(LPOSVERSIONINFOEXW);
|
||||
@@ -441,11 +441,7 @@ namespace OpenVulkano
|
||||
|
||||
std::string SystemInfo::GetOsNameHumanReadable()
|
||||
{
|
||||
static std::string osName;
|
||||
if (osName.empty())
|
||||
{
|
||||
osName = GetHumanReadableOSName();
|
||||
}
|
||||
static const std::string osName = GetHumanReadableOSName();
|
||||
return osName;
|
||||
}
|
||||
|
||||
@@ -456,7 +452,7 @@ namespace OpenVulkano
|
||||
|
||||
size_t SystemInfo::GetCpuCoreCount()
|
||||
{
|
||||
static size_t coreCount;
|
||||
static size_t coreCount = 0;
|
||||
if (coreCount == 0)
|
||||
{
|
||||
DWORD bufferSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user