chore: remove unused Arch::getOsName
This commit is contained in:
parent
a099276e4e
commit
3b811a1bd0
5 changed files with 0 additions and 43 deletions
|
|
@ -20,12 +20,6 @@ public:
|
||||||
//! @name accessors
|
//! @name accessors
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
//! Identify the OS
|
|
||||||
/*!
|
|
||||||
Returns a string identifying the operating system.
|
|
||||||
*/
|
|
||||||
virtual std::string getOSName() const = 0;
|
|
||||||
|
|
||||||
//! Identify the platform
|
//! Identify the platform
|
||||||
/*!
|
/*!
|
||||||
Returns a string identifying the platform this OS is running on.
|
Returns a string identifying the platform this OS is running on.
|
||||||
|
|
|
||||||
|
|
@ -32,21 +32,6 @@ ArchSystemUnix::~ArchSystemUnix()
|
||||||
// do nothing
|
// 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
|
std::string ArchSystemUnix::getPlatformName() const
|
||||||
{
|
{
|
||||||
#if defined(HAVE_SYS_UTSNAME_H)
|
#if defined(HAVE_SYS_UTSNAME_H)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ public:
|
||||||
virtual ~ArchSystemUnix();
|
virtual ~ArchSystemUnix();
|
||||||
|
|
||||||
// IArchSystem overrides
|
// IArchSystem overrides
|
||||||
virtual std::string getOSName() const;
|
|
||||||
virtual std::string getPlatformName() const;
|
virtual std::string getPlatformName() const;
|
||||||
virtual std::string setting(const std::string &) const;
|
virtual std::string setting(const std::string &) const;
|
||||||
virtual void setting(const std::string &, const std::string &) const;
|
virtual void setting(const std::string &, const std::string &) const;
|
||||||
|
|
|
||||||
|
|
@ -34,26 +34,6 @@ ArchSystemWindows::~ArchSystemWindows()
|
||||||
// do nothing
|
// 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
|
std::string ArchSystemWindows::getPlatformName() const
|
||||||
{
|
{
|
||||||
#ifdef _X86_
|
#ifdef _X86_
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ public:
|
||||||
virtual ~ArchSystemWindows();
|
virtual ~ArchSystemWindows();
|
||||||
|
|
||||||
// IArchSystem overrides
|
// IArchSystem overrides
|
||||||
virtual std::string getOSName() const;
|
|
||||||
virtual std::string getPlatformName() const;
|
virtual std::string getPlatformName() const;
|
||||||
virtual std::string setting(const std::string &valueName) const;
|
virtual std::string setting(const std::string &valueName) const;
|
||||||
virtual void setting(const std::string &valueName, const std::string &valueString) const;
|
virtual void setting(const std::string &valueName, const std::string &valueString) const;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue