Introduced static variables in places where the return value is a plain string

This commit is contained in:
Vladyslav Baranovskyi
2024-12-20 17:02:32 +02:00
parent 3748c9b150
commit b37b8dc639
3 changed files with 12 additions and 6 deletions

View File

@@ -64,7 +64,8 @@ namespace OpenVulkano
const std::string& SystemInfo::GetUserName()
{
return "";
static const std::string userName = "";
return userName;
}
const std::string& SystemInfo::GetHostName()
@@ -81,7 +82,8 @@ namespace OpenVulkano
const std::string& SystemInfo::GetDeviceVendorName()
{
return "Apple";
static const std::string vendorName = "Apple";
return vendorName;
}
const std::string& SystemInfo::GetDeviceModelName()
@@ -98,7 +100,8 @@ namespace OpenVulkano
const std::string& SystemInfo::GetOsName()
{
return "MacOS";
static const std::string osName = "MacOS";
return osName;
}
OsVersion SystemInfo::GetOsVersion()