moved GetOSVersion() to the base traits class; implement it in platform-specific files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,7 +94,7 @@ int wxConsoleAppTraits::GetOSVersion(int *verMaj, int *verMin)
|
||||
int major, minor;
|
||||
char name[256];
|
||||
|
||||
if ( sscanf(WXWIN_OS_DESCRIPTION, "%s %d.%d", name, &major, &minor) != 3 )
|
||||
if ( sscanf(WXWIN_OS_DESCRIPTION, "%.255s %d.%d", name, &major, &minor) != 3 )
|
||||
{
|
||||
// unreckognized uname string format
|
||||
major =
|
||||
|
@@ -817,17 +817,6 @@ wxString wxGetOsDescription()
|
||||
|
||||
#endif // !__WXMAC__
|
||||
|
||||
int wxGetOsVersion(int *verMaj, int *verMin)
|
||||
{
|
||||
// we want this function to work even if there is no wxApp
|
||||
wxConsoleAppTraits traitsConsole;
|
||||
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
|
||||
if ( ! traits )
|
||||
traits = &traitsConsole;
|
||||
|
||||
return traits->GetOSVersion(verMaj, verMin);
|
||||
}
|
||||
|
||||
unsigned long wxGetProcessId()
|
||||
{
|
||||
return (unsigned long)getpid();
|
||||
|
Reference in New Issue
Block a user