chore: remove unused Arch::getOsName

This commit is contained in:
sithlord48
2025-03-12 22:40:40 -04:00
committed by Nick Bolton
parent a099276e4e
commit 3b811a1bd0
5 changed files with 0 additions and 43 deletions

View File

@ -20,12 +20,6 @@ public:
//! @name accessors
//@{
//! Identify the OS
/*!
Returns a string identifying the operating system.
*/
virtual std::string getOSName() const = 0;
//! Identify the platform
/*!
Returns a string identifying the platform this OS is running on.

View File

@ -32,21 +32,6 @@ ArchSystemUnix::~ArchSystemUnix()
// do nothing
}
std::string ArchSystemUnix::getOSName() const
{
#if defined(HAVE_SYS_UTSNAME_H)
struct utsname info;
if (uname(&info) == 0) {
std::string msg;
msg += info.sysname;
msg += " ";
msg += info.release;
return msg;
}
#endif
return "Unix";
}
std::string ArchSystemUnix::getPlatformName() const
{
#if defined(HAVE_SYS_UTSNAME_H)

View File

@ -19,7 +19,6 @@ public:
virtual ~ArchSystemUnix();
// IArchSystem overrides
virtual std::string getOSName() const;
virtual std::string getPlatformName() const;
virtual std::string setting(const std::string &) const;
virtual void setting(const std::string &, const std::string &) const;

View File

@ -34,26 +34,6 @@ ArchSystemWindows::~ArchSystemWindows()
// do nothing
}
std::string ArchSystemWindows::getOSName() const
{
std::string osName("Microsoft Windows <unknown>");
static const TCHAR *const windowsVersionKeyNames[] = {
_T("SOFTWARE"), _T("Microsoft"), _T("Windows NT"), _T("CurrentVersion"), NULL
};
HKEY key = ArchMiscWindows::openKey(HKEY_LOCAL_MACHINE, windowsVersionKeyNames);
if (key == NULL) {
return osName;
}
std::string productName = ArchMiscWindows::readValueString(key, "ProductName");
if (osName.empty()) {
return osName;
}
return "Microsoft " + productName;
}
std::string ArchSystemWindows::getPlatformName() const
{
#ifdef _X86_

View File

@ -19,7 +19,6 @@ public:
virtual ~ArchSystemWindows();
// IArchSystem overrides
virtual std::string getOSName() const;
virtual std::string getPlatformName() const;
virtual std::string setting(const std::string &valueName) const;
virtual void setting(const std::string &valueName, const std::string &valueString) const;