Introduced static variables in places where the return value is a plain string
This commit is contained in:
@@ -64,7 +64,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetUserName()
|
const std::string& SystemInfo::GetUserName()
|
||||||
{
|
{
|
||||||
return "";
|
static const std::string userName = "";
|
||||||
|
return userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& SystemInfo::GetHostName()
|
const std::string& SystemInfo::GetHostName()
|
||||||
@@ -81,7 +82,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetDeviceVendorName()
|
const std::string& SystemInfo::GetDeviceVendorName()
|
||||||
{
|
{
|
||||||
return "Apple";
|
static const std::string vendorName = "Apple";
|
||||||
|
return vendorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& SystemInfo::GetDeviceModelName()
|
const std::string& SystemInfo::GetDeviceModelName()
|
||||||
@@ -98,7 +100,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetOsName()
|
const std::string& SystemInfo::GetOsName()
|
||||||
{
|
{
|
||||||
return "MacOS";
|
static const std::string osName = "MacOS";
|
||||||
|
return osName;
|
||||||
}
|
}
|
||||||
|
|
||||||
OsVersion SystemInfo::GetOsVersion()
|
OsVersion SystemInfo::GetOsVersion()
|
||||||
|
|||||||
@@ -421,7 +421,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetOsName()
|
const std::string& SystemInfo::GetOsName()
|
||||||
{
|
{
|
||||||
return "Windows";
|
static const std::string osName = "Windows";
|
||||||
|
return osName;
|
||||||
}
|
}
|
||||||
|
|
||||||
OsVersion SystemInfo::GetOsVersion()
|
OsVersion SystemInfo::GetOsVersion()
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetUserName()
|
const std::string& SystemInfo::GetUserName()
|
||||||
{
|
{
|
||||||
return "";
|
static const std::string userName = "";
|
||||||
|
return userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& SystemInfo::GetHostName()
|
const std::string& SystemInfo::GetHostName()
|
||||||
@@ -83,7 +84,8 @@ namespace OpenVulkano
|
|||||||
|
|
||||||
const std::string& SystemInfo::GetDeviceVendorName()
|
const std::string& SystemInfo::GetDeviceVendorName()
|
||||||
{
|
{
|
||||||
return "Apple";
|
static const std::string vendorName = "Apple";
|
||||||
|
return vendorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& SystemInfo::GetDeviceModelName()
|
const std::string& SystemInfo::GetDeviceModelName()
|
||||||
|
|||||||
Reference in New Issue
Block a user