chore: remove unused Arch::getOsName
This commit is contained in:
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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_
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user